The RM Java™ API provides a framework for declaring one or more documents or multiple versions of a document as a single record. A document stored in any IBM® Enterprise Records enabled repository can be declared as a record.
To verify that a document can be declared as a record, call the canDeclare method of an RMRecordContainer object.
<RMCONNECTOR_URL>
<REGISTRATION_ID> {DC783BDE-E175-4763-8902-356A1D4770B9} </REGISTRATION_ID>
<DOCUMENT_ID> {C4A973F9-4F6B-4FCB-BE59-B1697497EC9C} </DOCUMENT_ID>
</RMCONNECTOR_URL>
//returns the registration information;
String getRegistrationID(RMObjectStore aoStore, ObjectStore aoROSObjectStore, String asServerName,
String asCEDomain, boolean abCreate)
{
try
{
//If declare a record in CE
String lsRepositoryType="CE";
// If declare a record in CE
String IsRepositoryName=asCEDomain + "." + aoROSObjectStore.getName();
String IsRepositoryId=new RMUtil ().getRegistrationID(aoStore, IsRepositoryType,
asServerName, IsRepositoryName, abCreate);
}
catch(RMException aoRME)
{
}
}
public RecordInfo declare(String asURL, String[] asVersion, RMFolder[] aoFolder,
Properties aoRecordProps, String asRecordInfoClassID, Permissions aoRecordACLs,
boolean abAutoname) throws RMException;
In the method signature mentioned previously, the Autoname parameter is a boolean indicator that specifies whether the name of the record should be automatically generated or not. If the value is false, the name of the record is taken from the Document Title metadata of the document that is declared as record. If the value is true, the system ignores the Document Title and generates the name of the record, using the registered AutoName implementation. For more information about automatic generation of record names, refer to Defining auto-naming conventions .
The asRecordInfoClassID parameter specifies the ID of one of the following subclasses: Electronic Record, Marker, or Email Record. This parameter determines the type of RecordInfo object that will be created. To get the class ID of an RM type, use getClassIDs method in RMUtil class. For code example, see Creating a record folder.
The aoRecordProps represents the metadata or properties associated with a record. The required properties associated with the record differ for electronic, email, and marker records. For the same type of records, the required properties differ for different IBM Enterprise Records installations (BASE, DoD, PRO). See Properties for more information on how to retrieve the property descriptions for required properties, or how to examine which properties are required for an object using IBM Administration Console for Content Platform Engine.
Each time a document in ROS is declared as a record, a RecordInfo object is created in the FPOS and it points to the document object in ROS that is declared as record. As a result, even if the RecordInfo object is moved, exported, or relocated to another repository, the association between the document and RecordInfo object remains unchanged. After a document is declared as a record , an end user can only view the document, but cannot make any changes to that version of the document.
The other method signature of the declare method takes the document store where the document is stored as a parameter. As a result, you are not required to create a Registration ID when declaring records.
public RecordInfo declare(DocumentStore aoDocumentStore , String[] asDocumentsID,
RMFolder[] aoFolder, Properties aoRecordProps, String asRecordInfoClassID,
Permissions aoRecordACLs, boolean abAutoname) throws RMException;
//returns a DocumentStore object for the ObjectStore.
DocumentStore loDStore = loUtil.getDocumentStore(loObjectStore);