public void handleRequest(RequestContext rc) throws CLIException {
  super.handleRequest(rc);
  ldapLogin();
  adminSSOToken=getAdminSSOToken();
  if (!XACMLUtils.hasPermission(realm,adminSSOToken,"READ")) {
    String errorMessage=MessageFormat.format(getResourceString("permission-denied"),"list-xacml",getAdminID());
    String[] args={realm,"ANY",errorMessage};
    writeLog(LogWriter.LOG_ERROR,Level.INFO,"FAILED_GET_POLICY_IN_REALM",args);
    throw new CLIException(errorMessage,ExitCodes.REQUEST_CANNOT_BE_PROCESSED);
  }
  adminSubject=SubjectUtils.createSubject(adminSSOToken);
  realm=getStringOptionValue(IArgument.REALM_NAME);
  getPolicyNamesOnly=isOptionSet("namesonly");
  filters=convertToSearchFilters((List)rc.getOption(ARGUMENT_POLICY_NAMES));
  outfile=getStringOptionValue(IArgument.OUTPUT_FILE);
  outputWriter=getOutputWriter();
  if (getPolicyNamesOnly) {
    getPolicyNames();
  }
 else {
    getPolicies();
  }
}

public void handleRequest ( RequestContext rc ) throws CLIException { super . handleRequest ( rc ) ; ldapLogin ( ) ; adminSSOToken = getAdminSSOToken ( ) ; if ( ! XACMLUtils . hasPermission ( realm , adminSSOToken , "READ" ) ) { String errorMessage = MessageFormat . format ( getResourceString ( "permission-denied" ) , "list-xacml" , getAdminID ( ) ) ; String [ ] args = { realm , "ANY" , errorMessage } ; writeLog ( LogWriter . LOG_ERROR , Level . INFO , "FAILED_GET_POLICY_IN_REALM" , args ) ; throw new CLIException ( errorMessage , ExitCodes . REQUEST_CANNOT_BE_PROCESSED ) ; } adminSubject = SubjectUtils . createSubject ( adminSSOToken ) ; realm = getStringOptionValue ( IArgument . REALM_NAME ) ; getPolicyNamesOnly = isOptionSet ( "namesonly" ) ; filters = convertToSearchFilters ( ( List ) rc . getOption ( ARGUMENT_POLICY_NAMES ) ) ; outfile = getStringOptionValue ( IArgument . OUTPUT_FILE ) ; outputWriter = getOutputWriter ( ) ; if ( getPolicyNamesOnly ) { getPolicyNames ( ) ; } else { getPolicies ( ) ; } }
services a commandline request .
