Package com.mapr.cli

Class SecurityPolicyCommands

java.lang.Object
com.mapr.cliframework.base.CLIBaseClass
com.mapr.cli.common.ListCommand
com.mapr.cli.SecurityPolicyCommands
All Implemented Interfaces:
ListIterator, com.mapr.cliframework.base.CLIInterface

public class SecurityPolicyCommands extends ListCommand implements com.mapr.cliframework.base.CLIInterface
  • Field Details

  • Constructor Details

    • SecurityPolicyCommands

      public SecurityPolicyCommands(com.mapr.cliframework.base.ProcessedInput input, com.mapr.cliframework.base.CLICommand cliCommand) throws com.mapr.cliframework.base.CLIProcessingException
      Throws:
      com.mapr.cliframework.base.CLIProcessingException
  • Method Details

    • executeRealCommand

      public com.mapr.cliframework.base.CommandOutput executeRealCommand() throws com.mapr.cliframework.base.CLIProcessingException
      Specified by:
      executeRealCommand in class com.mapr.cliframework.base.CLIBaseClass
      Throws:
      com.mapr.cliframework.base.CLIProcessingException
    • securityPolicyLookupById

      public static com.mapr.fs.proto.PolicyServerProto.LookupSecurityPolicyResponse securityPolicyLookupById(String cluster, com.mapr.fs.proto.Security.CredentialsMsg creds, int securityPolicyId) throws com.mapr.cliframework.base.CLIProcessingException, com.mapr.security.MaprSecurityException
      Throws:
      com.mapr.cliframework.base.CLIProcessingException
      com.mapr.security.MaprSecurityException
    • securityPolicyLookupByName

      public static com.mapr.fs.proto.PolicyServerProto.LookupSecurityPolicyResponse securityPolicyLookupByName(String cluster, com.mapr.fs.proto.Security.CredentialsMsg creds, String securityPolicy) throws com.mapr.cliframework.base.CLIProcessingException, com.mapr.security.MaprSecurityException
      Throws:
      com.mapr.cliframework.base.CLIProcessingException
      com.mapr.security.MaprSecurityException
    • securityPolicyLookup

      public static com.mapr.fs.proto.PolicyServerProto.LookupSecurityPolicyResponse securityPolicyLookup(String cluster, com.mapr.fs.proto.Security.CredentialsMsg creds, String securityPolicy, int securityPolicyId) throws com.mapr.cliframework.base.CLIProcessingException, com.mapr.security.MaprSecurityException
      Throws:
      com.mapr.cliframework.base.CLIProcessingException
      com.mapr.security.MaprSecurityException
    • processResponse

      public void processResponse(com.mapr.cliframework.base.CommandOutput.OutputHierarchy out, com.google.protobuf.MessageLite response) throws com.mapr.cliframework.base.CLIProcessingException
      Description copied from interface: ListIterator
      Parse the response and populate the output hierarchy.
      Specified by:
      processResponse in interface ListIterator
      Specified by:
      processResponse in class ListCommand
      Parameters:
      out - - CommandOutput.OutputHierarchy
      response - - response object
      Throws:
      com.mapr.cliframework.base.CLIProcessingException
    • sendRequest

      public com.mapr.fs.proto.PolicyServerProto.SecurityPolicyListResponse sendRequest(com.google.protobuf.MessageLite request) throws com.mapr.cliframework.base.CLIProcessingException
      Description copied from interface: ListIterator
      Send the request using RPC and fetch the response.
      Specified by:
      sendRequest in interface ListIterator
      Specified by:
      sendRequest in class ListCommand
      Parameters:
      request - - request object.
      Returns:
      - the response object.
      Throws:
      com.mapr.cliframework.base.CLIProcessingException
    • buildNextRequest

      public com.mapr.fs.proto.PolicyServerProto.SecurityPolicyListRequest buildNextRequest(com.google.protobuf.MessageLite prevReq, com.google.protobuf.MessageLite prevResp) throws com.mapr.cliframework.base.CLIProcessingException
      Description copied from interface: ListIterator
      Builds the next request object by inspecting the previous request and previous response.
      Specified by:
      buildNextRequest in interface ListIterator
      Specified by:
      buildNextRequest in class ListCommand
      Returns:
      - new request object
      Throws:
      com.mapr.cliframework.base.CLIProcessingException
    • hasMore

      public boolean hasMore(com.google.protobuf.MessageLite prevReq, com.google.protobuf.MessageLite prevResp) throws com.mapr.cliframework.base.CLIProcessingException
      Description copied from interface: ListIterator
      Inspect the last request and last response to see if there are more records to be fetched.
      Specified by:
      hasMore in interface ListIterator
      Specified by:
      hasMore in class ListCommand
      Returns:
      - true, if there are more records. false, if no more.
      Throws:
      com.mapr.cliframework.base.CLIProcessingException