Class ProfileCLI

java.lang.Object
org.dogtagpki.cli.CLI
com.netscape.cmstools.profile.ProfileCLI

public class ProfileCLI extends CLI
  • Field Details

    • logger

      public static org.slf4j.Logger logger
    • caCLI

      public CACLI caCLI
    • profileClient

      public ProfileClient profileClient
  • Constructor Details

    • ProfileCLI

      public ProfileCLI(CACLI caCLI)
  • Method Details

    • getFullName

      public String getFullName()
      Overrides:
      getFullName in class CLI
    • getManPage

      public String getManPage()
      Overrides:
      getManPage in class CLI
    • getProfileClient

      public ProfileClient getProfileClient() throws Exception
      Throws:
      Exception
    • printProfileDataInfo

      public static void printProfileDataInfo(ProfileDataInfo info)
    • printProfile

      public static void printProfile(ProfileData data)
    • saveProfileToFile

      public static void saveProfileToFile(String filename, ProfileData data) throws Exception
      Throws:
      Exception
    • readProfileFromFile

      public static ProfileData readProfileFromFile(String filename) throws Exception
      Throws:
      Exception
    • readRawProfileFromFile

      public static byte[] readRawProfileFromFile(Path path) throws PKIException, IOException
      Reads a raw profile from the specified file.
      Throws:
      PKIException - if it doesn't parse as a Properties or if it doesn't contain the profileId field.
      IOException
    • readRawProfileFromFile

      public static byte[] readRawProfileFromFile(String path) throws PKIException, IOException
      Reads a raw profile from the specified file.
      Throws:
      PKIException - if it doesn't parse as a Properties or if it doesn't contain the profileId field.
      IOException
    • checkConfiguration

      public static void checkConfiguration(byte[] in, boolean requireProfileId, boolean requireDisabled) throws PKIException
      Sanity check the profile configuration. We are working with plain byte[] because java.util.Properties has undesirable (i.e. bug-causing) escaping behaviour (it inserts backslashes in places we don't want them). But we do still want to check that the input looks something like a profile configuration. So we use java.util.Properties to do that.
      Throws:
      PKIException
    • saveEnrollmentTemplateToFile

      public static void saveEnrollmentTemplateToFile(String filename, CertEnrollmentRequest request) throws Exception
      Throws:
      Exception
    • printEnrollmentTemplate

      public static void printEnrollmentTemplate(CertEnrollmentRequest request)