// Path: src/com/govu/util/Util.java
// public class Util {
// 
//     public static boolean isDomainValid(String domain) {
//         return DOMAIN_NAME_PATTERN.matcher(domain).matches();
//     }
//     
//     public static final Pattern DOMAIN_NAME_PATTERN = Pattern.compile("^[A-Za-z0-9-]+(\\.[A-Za-z0-9-]+)*(\\.[A-Za-z]{2,})$");
// }


import com.govu.util.Util;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.logging.Level;
import java.util.logging.Logger;
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.govu.command;


/**
 *
 * @author Mehmet Ecevit
 */
public class DeleteCommand extends Command {

    public DeleteCommand() {
        super();
    }

    @Override
    public void process(String[] args) {
        if (args.length < 2) {
            System.out.println("Invalid arguments for deploy");
        }
        
        try {
            String domain = args[1];
            String password = args.length > 2 ? args[2] : null;

            System.out.println("Domain: " + domain);
            
// Path: src/com/govu/util/Util.java
// public class Util {
// 
//     public static boolean isDomainValid(String domain) {
//         return DOMAIN_NAME_PATTERN.matcher(domain).matches();
//     }
//     
//     public static final Pattern DOMAIN_NAME_PATTERN = Pattern.compile("^[A-Za-z0-9-]+(\\.[A-Za-z0-9-]+)*(\\.[A-Za-z]{2,})$");
// }


// Path: src/com/govu/command/DeleteCommand.java
import com.govu.util.Util;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.logging.Level;
import java.util.logging.Logger;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.govu.command;


/**
 *
 * @author Mehmet Ecevit
 */
public class DeleteCommand extends Command {

    public DeleteCommand() {
        super();
    }

    @Override
    public void process(String[] args) {
        if (args.length < 2) {
            System.out.println("Invalid arguments for deploy");
        }
        
        try {
            String domain = args[1];
            String password = args.length > 2 ? args[2] : null;

            System.out.println("Domain: " + domain);
            
            if (domain.toLowerCase().equals("codegovu.com") || !Util.isDomainValid(domain )) {