Package org.cdlib.mrt.core
Class ValidateStorageCmdParms
java.lang.Object
org.cdlib.mrt.core.ValidateStorageCmdParms
General validation methods command line info
- Author:
- dloy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static int
getInteger
(String header, String value) Convert String to numeric and throw exception if invalidstatic TException
setException
(String header) static void
testArchiveType
(String archiveType) static void
testContext
(String context) static void
testFileName
(String fileName) static void
testLocalID
(String localID) static void
testNodeID
(int nodeID) static void
testObjectID
(Identifier objectID) static void
testVersionID
(Integer versionID) static String
validateContext
(String context) Validate context (ingest profile, access group ...)static String
validateFileName
(String fileName) Validate file namestatic String
validateLocalID
(String localID) Validate local identifierstatic int
validateNodeID
(String nodeID) Validate and convert nodeIDstatic Identifier
validateObjectID
(String objectIDS) Validate and convert Object Identifierstatic int
validateVersionID
(String versionID) Validate and convert versionID
-
Constructor Details
-
ValidateStorageCmdParms
public ValidateStorageCmdParms()
-
-
Method Details
-
validateVersionID
Validate and convert versionID- Parameters:
versionID
- String form of versionID- Returns:
- numeric form
- Throws:
TException
- if not present
-
validateNodeID
Validate and convert nodeID- Parameters:
nodeID
- String form of node identifier- Returns:
- numeric form
- Throws:
TException
- if not present
-
validateFileName
Validate file name- Parameters:
fileName
- passed fileName- Returns:
- fileName
- Throws:
TException
- not present
-
validateObjectID
Validate and convert Object Identifier- Parameters:
objectIDS
- String form of Identifier- Returns:
- Identifier form
- Throws:
TException
- not present
-
validateContext
Validate context (ingest profile, access group ...)- Parameters:
passed
- context- Returns:
- context
- Throws:
TException
- not present
-
validateLocalID
Validate local identifier- Parameters:
passed
- localID- Returns:
- localID
- Throws:
TException
- not present
-
getInteger
Convert String to numeric and throw exception if invalid- Parameters:
header
- Exception display headervalue
- String to convert to numeric- Returns:
- int form of value
- Throws:
TException
- invalid numeric
-
testNodeID
- Throws:
TException
-
testVersionID
- Throws:
TException
-
testObjectID
- Throws:
TException
-
testFileName
- Throws:
TException
-
testArchiveType
- Throws:
TException
-
testContext
- Throws:
TException
-
testLocalID
- Throws:
TException
-
setException
-