Class ValidateStorageCmdParms

java.lang.Object
org.cdlib.mrt.core.ValidateStorageCmdParms

public class ValidateStorageCmdParms extends Object
General validation methods command line info
Author:
dloy
  • Constructor Details

    • ValidateStorageCmdParms

      public ValidateStorageCmdParms()
  • Method Details

    • validateVersionID

      public static int validateVersionID(String versionID) throws TException
      Validate and convert versionID
      Parameters:
      versionID - String form of versionID
      Returns:
      numeric form
      Throws:
      TException - if not present
    • validateNodeID

      public static int validateNodeID(String nodeID) throws TException
      Validate and convert nodeID
      Parameters:
      nodeID - String form of node identifier
      Returns:
      numeric form
      Throws:
      TException - if not present
    • validateFileName

      public static String validateFileName(String fileName) throws TException
      Validate file name
      Parameters:
      fileName - passed fileName
      Returns:
      fileName
      Throws:
      TException - not present
    • validateObjectID

      public static Identifier validateObjectID(String objectIDS) throws TException
      Validate and convert Object Identifier
      Parameters:
      objectIDS - String form of Identifier
      Returns:
      Identifier form
      Throws:
      TException - not present
    • validateContext

      public static String validateContext(String context) throws TException
      Validate context (ingest profile, access group ...)
      Parameters:
      passed - context
      Returns:
      context
      Throws:
      TException - not present
    • validateLocalID

      public static String validateLocalID(String localID) throws TException
      Validate local identifier
      Parameters:
      passed - localID
      Returns:
      localID
      Throws:
      TException - not present
    • getInteger

      protected static int getInteger(String header, String value) throws TException
      Convert String to numeric and throw exception if invalid
      Parameters:
      header - Exception display header
      value - String to convert to numeric
      Returns:
      int form of value
      Throws:
      TException - invalid numeric
    • testNodeID

      public static void testNodeID(int nodeID) throws TException
      Throws:
      TException
    • testVersionID

      public static void testVersionID(Integer versionID) throws TException
      Throws:
      TException
    • testObjectID

      public static void testObjectID(Identifier objectID) throws TException
      Throws:
      TException
    • testFileName

      public static void testFileName(String fileName) throws TException
      Throws:
      TException
    • testArchiveType

      public static void testArchiveType(String archiveType) throws TException
      Throws:
      TException
    • testContext

      public static void testContext(String context) throws TException
      Throws:
      TException
    • testLocalID

      public static void testLocalID(String localID) throws TException
      Throws:
      TException
    • setException

      public static TException setException(String header)