Package fr.gouv.vitam.common.guid
Class GUIDFactory
java.lang.Object
fr.gouv.vitam.common.guid.GUIDFactory
GUID Factory
Usage:
One should use the appropriate helper according to the type of the object for the GUID.
For instance: for a Unit newUnitGUID(tenantId);
No one should not in general use directly newGUID helpers.
Usage:
One should use the appropriate helper according to the type of the object for the GUID.
For instance: for a Unit newUnitGUID(tenantId);
No one should not in general use directly newGUID helpers.
-
Method Summary
Modifier and TypeMethodDescriptionstatic final intstatic final intstatic final booleanstatic final GUIDnewAccessionRegisterDetailGUID(int tenantId) Create an accession register detail GUIDstatic final GUIDnewAccessionRegisterSummaryGUID(int tenantId) Create a Accession register summary GUIDstatic final GUIDnewAccessionRegisterSymbolicGUID(int tenantId) Create a Accession register summary GUIDstatic final GUIDnewAgencyGUID(int tenantId) Create a Agencies GUIDstatic final GUIDCreate a Context GUIDstatic final GUIDnewContractGUID(int tenantId) Create a contract GUIDstatic final GUIDnewEventGUID(int tenantId) Create a Operation Id GUIDstatic final GUIDnewEventGUID(GUID logbookGUID) Create an Event GUID (within Operation or Lifecycle Logbooks)static final GUIDnewGUID()Usable for internal GUID with default tenantId (0) and objectType (0)static final GUIDnewManifestGUID(int tenantId) Create a Manifest GUID (SEDA)static final GUIDnewObjectGroupGUID(int tenantId) Create a ObjectGroup GUIDstatic final GUIDnewObjectGroupGUID(GUID unitParentGUID) Create a ObjectGroup GUIDstatic final GUIDnewObjectGUID(int tenantId) Create a Object GUIDstatic final GUIDnewObjectGUID(GUID objectGroupParentGUID) Create a Object GUIDstatic final GUIDnewOntologyGUID(int tenantId) Create an ontology GUIDstatic final GUIDnewOperationLogbookGUID(int tenantId) Create a Operation Logbook GUIDstatic final GUIDnewProfileGUID(int tenantId) Create a Profile GUIDstatic final GUIDnewRequestIdGUID(int tenantId) Create a Request Id GUID (X-CID)static final GUIDnewStorageOperationGUID(int tenantId, boolean worm) Create a Storage Operation GUIDstatic final GUIDnewUnitGUID(int tenantId) Create a Unit GUIDstatic final GUIDnewWriteLogbookGUID(int tenantId) Create a Write Logbook GUID
-
Method Details
-
newGUID
Usable for internal GUID with default tenantId (0) and objectType (0)- Returns:
- a new GUID
-
newUnitGUID
Create a Unit GUID- Parameters:
tenantId- tenant id between 0 and 2^30-1- Returns:
- a new GUID
- Throws:
IllegalArgumentException- if any of the argument are out of range
-
newObjectGroupGUID
Create a ObjectGroup GUID- Parameters:
tenantId- tenant id between 0 and 2^30-1- Returns:
- a new GUID
- Throws:
IllegalArgumentException- if any of the argument are out of range
-
newObjectGroupGUID
Create a ObjectGroup GUID- Parameters:
unitParentGUID- GUID of parent Unit- Returns:
- a new GUID
-
newObjectGUID
Create a Object GUID- Parameters:
tenantId- tenant id between 0 and 2^30-1- Returns:
- a new GUID
- Throws:
IllegalArgumentException- if any of the argument are out of range
-
newObjectGUID
Create a Object GUID- Parameters:
objectGroupParentGUID- GUID of parent ObjectGroup- Returns:
- a new GUID
-
newOperationLogbookGUID
Create a Operation Logbook GUID- Parameters:
tenantId- tenant id between 0 and 2^30-1- Returns:
- a new GUID
- Throws:
IllegalArgumentException- if any of the argument are out of range
-
newWriteLogbookGUID
Create a Write Logbook GUID- Parameters:
tenantId- tenant id between 0 and 2^30-1- Returns:
- a new GUID
- Throws:
IllegalArgumentException- if any of the argument are out of range
-
newStorageOperationGUID
Create a Storage Operation GUID- Parameters:
tenantId- tenant id between 0 and 2^30-1worm-- Returns:
- a new GUID
- Throws:
IllegalArgumentException- if any of the argument are out of range
-
newEventGUID
Create a Operation Id GUID- Parameters:
tenantId- tenant id between 0 and 2^30-1- Returns:
- a new GUID
- Throws:
IllegalArgumentException- if any of the argument are out of range
-
newEventGUID
Create an Event GUID (within Operation or Lifecycle Logbooks)- Parameters:
logbookGUID- GUID of corresponding Logbook- Returns:
- a new GUID
- Throws:
IllegalArgumentException- if any of the argument are out of range
-
newRequestIdGUID
Create a Request Id GUID (X-CID)- Parameters:
tenantId- tenant id between 0 and 2^30-1- Returns:
- a new GUID
- Throws:
IllegalArgumentException- if any of the argument are out of range
-
newManifestGUID
Create a Manifest GUID (SEDA)- Parameters:
tenantId- tenant id between 0 and 2^30-1- Returns:
- a new GUID
- Throws:
IllegalArgumentException- if any of the argument are out of range
-
newAccessionRegisterSummaryGUID
Create a Accession register summary GUID- Parameters:
tenantId- tenant id between 0 and 2^30-1- Returns:
- a new GUID
- Throws:
IllegalArgumentException- if any of the argument are out of range
-
newAccessionRegisterSymbolicGUID
Create a Accession register summary GUID- Parameters:
tenantId- tenant id between 0 and 2^30-1- Returns:
- a new GUID
- Throws:
IllegalArgumentException- if any of the argument are out of range
-
newContractGUID
Create a contract GUID- Parameters:
tenantId- tenant id between 0 and 2^30-1- Returns:
- a new GUID
- Throws:
IllegalArgumentException- if any of the argument are out of range
-
newProfileGUID
Create a Profile GUID- Parameters:
tenantId- tenant id between 0 and 2^30-1- Returns:
- a new GUID
- Throws:
IllegalArgumentException- if any of the argument are out of range
-
newOntologyGUID
Create an ontology GUID- Parameters:
tenantId- tenant id between 0 and 2^30-1- Returns:
- a new GUID
- Throws:
IllegalArgumentException- if any of the argument are out of range
-
newContextGUID
Create a Context GUID- Returns:
- a new GUID
- Throws:
IllegalArgumentException- if any of the argument are out of range
-
newAgencyGUID
Create a Agencies GUID- Returns:
- a new GUID
- Throws:
IllegalArgumentException- if any of the argument are out of range
-
newAccessionRegisterDetailGUID
Create an accession register detail GUID- Returns:
- a new GUID
- Throws:
IllegalArgumentException- if any of the argument are out of range
-
isWorm
- Parameters:
uuid-- Returns:
- True if the given GUID is using a WORM media
-
getKeysize
public static final int getKeysize()- Returns:
- the size of the key in bytes
-
getKeysizeBase32
public static final int getKeysizeBase32()- Returns:
- the size of the key using Base32 format in bytes
-