| | |
| | | { |
| | | // Create-ads subcommand |
| | | createAdsSubCmd = new SubCommand(argParser, SubCommandNameEnum.CREATE_ADS |
| | | .toString(), true, 1, 1, OPERAND_BACKEND, |
| | | .toString(), true, 3, 3, OPERAND_BACKEND, |
| | | MSGID_ADMIN_SUBCMD_CREATE_ADS_DESCRIPTION); |
| | | createAdsSubCmd.setHidden(true); |
| | | |
| | |
| | | if (subCmd.getName().equals(createAdsSubCmd.getName())) |
| | | { |
| | | String backendName = subCmd.getTrailingArguments().get(0); |
| | | String dbDirectory = subCmd.getTrailingArguments().get(1); |
| | | String importTempDirectory = subCmd.getTrailingArguments().get(2); |
| | | ADSContextHelper helper = new ADSContextHelper(); |
| | | adsContext.createAdminData(); |
| | | helper.createAdministrationSuffix(adsContext.getDirContext(), |
| | | backendName); |
| | | backendName, dbDirectory, importTempDirectory); |
| | | return ReturnCode.SUCCESSFUL; |
| | | } |
| | | else if (subCmd.getName().equals(deleteAdsSubCmd.getName())) |
| | |
| | | return ReturnCode.SUCCESSFUL; |
| | | } |
| | | |
| | | // Should never occurs: If we are here, it means that the code to |
| | | // Should never occur: If we are here, it means that the code to |
| | | // handle to subcommand is not yet written. |
| | | return ReturnCode.ERROR_UNEXPECTED; |
| | | } |