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 int
static final int
static final boolean
static final GUID
newAccessionRegisterDetailGUID
(int tenantId) Create an accession register detail GUIDstatic final GUID
newAccessionRegisterSummaryGUID
(int tenantId) Create a Accession register summary GUIDstatic final GUID
newAccessionRegisterSymbolicGUID
(int tenantId) Create a Accession register summary GUIDstatic final GUID
newAgencyGUID
(int tenantId) Create a Agencies GUIDstatic final GUID
Create a Context GUIDstatic final GUID
newContractGUID
(int tenantId) Create a contract GUIDstatic final GUID
newEventGUID
(int tenantId) Create a Operation Id GUIDstatic final GUID
newEventGUID
(GUID logbookGUID) Create an Event GUID (within Operation or Lifecycle Logbooks)static final GUID
newGUID()
Usable for internal GUID with default tenantId (0) and objectType (0)static final GUID
newManifestGUID
(int tenantId) Create a Manifest GUID (SEDA)static final GUID
newObjectGroupGUID
(int tenantId) Create a ObjectGroup GUIDstatic final GUID
newObjectGroupGUID
(GUID unitParentGUID) Create a ObjectGroup GUIDstatic final GUID
newObjectGUID
(int tenantId) Create a Object GUIDstatic final GUID
newObjectGUID
(GUID objectGroupParentGUID) Create a Object GUIDstatic final GUID
newOntologyGUID
(int tenantId) Create an ontology GUIDstatic final GUID
newOperationLogbookGUID
(int tenantId) Create a Operation Logbook GUIDstatic final GUID
newProfileGUID
(int tenantId) Create a Profile GUIDstatic final GUID
newRequestIdGUID
(int tenantId) Create a Request Id GUID (X-CID)static final GUID
newStorageOperationGUID
(int tenantId, boolean worm) Create a Storage Operation GUIDstatic final GUID
newUnitGUID
(int tenantId) Create a Unit GUIDstatic final GUID
newWriteLogbookGUID
(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
-