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 intgetInteger(String header, String value) Convert String to numeric and throw exception if invalidstatic TExceptionsetException(String header) static voidtestArchiveType(String archiveType) static voidtestContext(String context) static voidtestFileName(String fileName) static voidtestLocalID(String localID) static voidtestNodeID(int nodeID) static voidtestObjectID(Identifier objectID) static voidtestVersionID(Integer versionID) static StringvalidateContext(String context) Validate context (ingest profile, access group ...)static StringvalidateFileName(String fileName) Validate file namestatic StringvalidateLocalID(String localID) Validate local identifierstatic intvalidateNodeID(String nodeID) Validate and convert nodeIDstatic IdentifiervalidateObjectID(String objectIDS) Validate and convert Object Identifierstatic intvalidateVersionID(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
-