tools/twiddle/cli/src/main/java/org/mobicents/tools/twiddle/jslee/DeployCommand.java
@Override
	protected void processArguments(String[] args) throws CommandException {
		//String sopts = ":lyi:u:d:sr:";
		String sopts = ":lyi:u:dr:";
		LongOpt[] lopts = {
				new LongOpt("list", LongOpt.NO_ARGUMENT, null, 'l'),
					//options
					new LongOpt("sbbs", LongOpt.OPTIONAL_ARGUMENT, null, ListOperation.sbbs),
					new LongOpt("services", LongOpt.NO_ARGUMENT, null, ListOperation.services),
					new LongOpt("libraries", LongOpt.NO_ARGUMENT, null, ListOperation.libraries),
					new LongOpt("events", LongOpt.NO_ARGUMENT, null, ListOperation.events),
					new LongOpt("ra-types", LongOpt.NO_ARGUMENT, null, ListOperation.ra_types),
					new LongOpt("ras", LongOpt.NO_ARGUMENT, null, ListOperation.ras),
					new LongOpt("dus", LongOpt.NO_ARGUMENT, null, ListOperation.dus),
					new LongOpt("profile-spec", LongOpt.NO_ARGUMENT, null, ListOperation.profile_specs),
				new LongOpt("installed", LongOpt.NO_ARGUMENT, null, 'y'),
					new LongOpt("cid", LongOpt.REQUIRED_ARGUMENT, null, IsInstalledOperation.cid),
					new LongOpt("duid", LongOpt.REQUIRED_ARGUMENT, null, IsInstalledOperation.duid),
				new LongOpt("install", LongOpt.REQUIRED_ARGUMENT, null, 'i'),
				new LongOpt("un-install", LongOpt.REQUIRED_ARGUMENT, null, 'u'),
				//new LongOpt("duid", LongOpt.REQUIRED_ARGUMENT, null, 'd'),
				new LongOpt("desc", LongOpt.NO_ARGUMENT, null, 'd'),
					//new LongOpt("cid", LongOpt.REQUIRED_ARGUMENT, null, GetDescriptorsOperation.cid),
					//new LongOpt("duid", LongOpt.REQUIRED_ARGUMENT, null, GetDescriptorsOperation.duid),
				new LongOpt("ref", LongOpt.REQUIRED_ARGUMENT, null, 'r'),
				

		};

		Getopt getopt = new Getopt(null, args, sopts, lopts);
		getopt.setOpterr(false);

		int code;
		while ((code = getopt.getopt()) != -1) {
			switch (code) {
			case ':':
				throw new CommandException("Option requires an argument: " + args[getopt.getOptind() - 1]);

			case '?':
				throw new CommandException("Invalid (or ambiguous) option: " + args[getopt.getOptind() - 1]);

			case 'l':

				super.operation = new ListOperation(super.context, super.log, this);
				super.operation.buildOperation(getopt, args);

				break;
			case 'y':

				super.operation = new IsInstalledOperation(super.context, super.log, this);
				super.operation.buildOperation(getopt, args);

				break;
			case 'i':

				super.operation = new InstallOperation(super.context, super.log, this);
				super.operation.buildOperation(getopt, args);

				break;
			case 'u':

				super.operation = new UninstallOperation(super.context, super.log, this);
				super.operation.buildOperation(getopt, args);

				break;
			case 'd':

				//super.operation = new DeployableUnitIDOperation(super.context, super.log, this);
				//super.operation.buildOperation(getopt, args);

				//break;
			//case 's':

				super.operation = new GetDescriptorsOperation(super.context, super.log, this);
				super.operation.buildOperation(getopt, args);

				break;
			case 'r':

				super.operation = new GetReferringComponentsOperation(super.context, super.log, this);
				super.operation.buildOperation(getopt, args);

				break;

			
			default:
				throw new CommandException("Command: \"" + getName() + "\", found unexpected opt: " + args[getopt.getOptind() - 1]);

			}
		}
	}
@Override
	protected void processArguments(String[] args) throws CommandException {
		//String sopts = ":lyi:u:d:sr:";
		String sopts = ":lyi:u:dr:";
		LongOpt[] lopts = {
				new LongOpt("list", LongOpt.NO_ARGUMENT, null, 'l'),
					//options
					new LongOpt("sbbs", LongOpt.OPTIONAL_ARGUMENT, null, ListOperation.sbbs),
					new LongOpt("services", LongOpt.NO_ARGUMENT, null, ListOperation.services),
					new LongOpt("libraries", LongOpt.NO_ARGUMENT, null, ListOperation.libraries),
					new LongOpt("events", LongOpt.NO_ARGUMENT, null, ListOperation.events),
					new LongOpt("ra-types", LongOpt.NO_ARGUMENT, null, ListOperation.ra_types),
					new LongOpt("ras", LongOpt.NO_ARGUMENT, null, ListOperation.ras),
					new LongOpt("dus", LongOpt.NO_ARGUMENT, null, ListOperation.dus),
					new LongOpt("profile-spec", LongOpt.NO_ARGUMENT, null, ListOperation.profile_specs),
				new LongOpt("installed", LongOpt.NO_ARGUMENT, null, 'y'),
					new LongOpt("cid", LongOpt.REQUIRED_ARGUMENT, null, IsInstalledOperation.cid),
					new LongOpt("duid", LongOpt.REQUIRED_ARGUMENT, null, IsInstalledOperation.duid),
				new LongOpt("install", LongOpt.REQUIRED_ARGUMENT, null, 'i'),
				new LongOpt("un-install", LongOpt.REQUIRED_ARGUMENT, null, 'u'),
				//new LongOpt("duid", LongOpt.REQUIRED_ARGUMENT, null, 'd'),
				new LongOpt("desc", LongOpt.NO_ARGUMENT, null, 'd'),
					//new LongOpt("cid", LongOpt.REQUIRED_ARGUMENT, null, GetDescriptorsOperation.cid),
					//new LongOpt("duid", LongOpt.REQUIRED_ARGUMENT, null, GetDescriptorsOperation.duid),
				new LongOpt("ref", LongOpt.REQUIRED_ARGUMENT, null, 'r'),
				

		};

		Getopt getopt = new Getopt(null, args, sopts, lopts);
		getopt.setOpterr(false);

		int code;
		while ((code = getopt.getopt()) != -1) {
			switch (code) {
			case ':':
				throw new CommandException("Option requires an argument: " + args[getopt.getOptind() - 1]);

			case '?':
				throw new CommandException("Invalid (or ambiguous) option: " + args[getopt.getOptind() - 1]);

			case 'l':

				super.operation = new ListOperation(super.context, super.log, this);
				super.operation.buildOperation(getopt, args);

				break;
			case 'y':

				super.operation = new IsInstalledOperation(super.context, super.log, this);
				super.operation.buildOperation(getopt, args);

				break;
			case 'i':

				super.operation = new InstallOperation(super.context, super.log, this);
				super.operation.buildOperation(getopt, args);

				break;
			case 'u':

				super.operation = new UninstallOperation(super.context, super.log, this);
				super.operation.buildOperation(getopt, args);

				break;
			case 'd':

				//super.operation = new DeployableUnitIDOperation(super.context, super.log, this);
				//super.operation.buildOperation(getopt, args);

				//break;
			//case 's':

				super.operation = new GetDescriptorsOperation(super.context, super.log, this);
				super.operation.buildOperation(getopt, args);

				break;
			case 'r':

				super.operation = new GetReferringComponentsOperation(super.context, super.log, this);
				super.operation.buildOperation(getopt, args);

				break;

			
			default:
				throw new CommandException("Command: \"" + getName() + "\", found unexpected opt: " + args[getopt.getOptind() - 1]);

			}
		}
	}
@ Override protected void processArguments ( String [ ] args ) throws CommandException { //String sopts = ":lyi:u:d:sr:";
 String sopts = ":lyi:u:dr:" ; LongOpt [ ] lopts = { new LongOpt ( "list" , LongOpt . NO_ARGUMENT , null , ' ' ) , //options
 new LongOpt ( "sbbs" , LongOpt . OPTIONAL_ARGUMENT , null , ListOperation . sbbs ) , new LongOpt ( "services" , LongOpt . NO_ARGUMENT , null , ListOperation . services ) , new LongOpt ( "libraries" , LongOpt . NO_ARGUMENT , null , ListOperation . libraries ) , new LongOpt ( "events" , LongOpt . NO_ARGUMENT , null , ListOperation . events ) , new LongOpt ( "ra-types" , LongOpt . NO_ARGUMENT , null , ListOperation . ra_types ) , new LongOpt ( "ras" , LongOpt . NO_ARGUMENT , null , ListOperation . ras ) , new LongOpt ( "dus" , LongOpt . NO_ARGUMENT , null , ListOperation . dus ) , new LongOpt ( "profile-spec" , LongOpt . NO_ARGUMENT , null , ListOperation . profile_specs ) , new LongOpt ( "installed" , LongOpt . NO_ARGUMENT , null , ' ' ) , new LongOpt ( "cid" , LongOpt . REQUIRED_ARGUMENT , null , IsInstalledOperation . cid ) , new LongOpt ( "duid" , LongOpt . REQUIRED_ARGUMENT , null , IsInstalledOperation . duid ) , new LongOpt ( "install" , LongOpt . REQUIRED_ARGUMENT , null , ' ' ) , new LongOpt ( "un-install" , LongOpt . REQUIRED_ARGUMENT , null , ' ' ) , //new LongOpt("duid", LongOpt.REQUIRED_ARGUMENT, null, 'd'),
 new LongOpt ( "desc" , LongOpt . NO_ARGUMENT , null , ' ' ) , //new LongOpt("cid", LongOpt.REQUIRED_ARGUMENT, null, GetDescriptorsOperation.cid),
 //new LongOpt("duid", LongOpt.REQUIRED_ARGUMENT, null, GetDescriptorsOperation.duid),
 new LongOpt ( "ref" , LongOpt . REQUIRED_ARGUMENT , null , ' ' ) , } ; Getopt getopt = new Getopt ( null , args , sopts , lopts ) ; getopt . setOpterr ( false ) ; int code ; while ( ( code = getopt . getopt ( ) ) != - 1 ) { switch ( code ) { case ' ' : throw new CommandException ( "Option requires an argument: " + args [ getopt . getOptind ( ) - 1 ] ) ; case ' ' : throw new CommandException ( "Invalid (or ambiguous) option: " + args [ getopt . getOptind ( ) - 1 ] ) ; case ' ' : super . operation = new ListOperation ( super . context , super . log , this ) ; super . operation . buildOperation ( getopt , args ) ; break ; case ' ' : super . operation = new IsInstalledOperation ( super . context , super . log , this ) ; super . operation . buildOperation ( getopt , args ) ; break ; case ' ' : super . operation = new InstallOperation ( super . context , super . log , this ) ; super . operation . buildOperation ( getopt , args ) ; break ; case ' ' : super . operation = new UninstallOperation ( super . context , super . log , this ) ; super . operation . buildOperation ( getopt , args ) ; break ; case ' ' : //super.operation = new DeployableUnitIDOperation(super.context, super.log, this);
 //super.operation.buildOperation(getopt, args);
 //break;
 //case 's':
 super . operation = new GetDescriptorsOperation ( super . context , super . log , this ) ; super . operation . buildOperation ( getopt , args ) ; break ; case ' ' : super . operation = new GetReferringComponentsOperation ( super . context , super . log , this ) ; super . operation . buildOperation ( getopt , args ) ; break ; default : throw new CommandException ( "Command: \"" + getName ( ) + "\", found unexpected opt: " + args [ getopt . getOptind ( ) - 1 ] ) ; } } }
/* (non-Javadoc)
@see org.mobicents.slee.tools.twiddle.AbstractSleeCommand#processArguments(java.lang.String[])
/ * ( non - Javadoc )