A RecordCategory object represents a container object that can contain record categories and record folders. A RecordCategory object is created under a classification scheme to extend the file plan hierarchy by adding levels to the classification scheme and by defining a set of records within the file plan. This object can contain a record category or a record folder as its first-level child object. However, you cannot create a record folder and a record category at the same level.
//Creates a RecordCategory object public void createRecordCategory( String asName, Properties aoProps, Permissions aoACLs, ClassificationScheme aoParentCS) { RecordCategory loRC = aoParentCS.addRecordCategory(asName, aoProps, aoACLs); }
You can retrieve RecordCategory objects in the following ways:
//Retrieves a RecordCategory object public RecordCategory getRecordCategory(RMObjectStore aoRMOS, String asRCGUID) { RecordCategory loRC = (RecordCategory)aoRMOS.getObject( RMType.RM_TYPE_RECORDCATEGORY, asRCGUID); return loRC; }
//Retrieves a RecordCategory object public RecordCategory getRecordCategory1( RMObjectStore aoRMOS, String asRCGUID) { Folder loFolder = (Folder)aoRMOS.getObject(BaseObject.TYPE_FOLDER, asRCGUID); RecordCategory loRC = aoRMOS.getRecordCategoryInterface(loFolder); return loRC; }
//Retrieves RecordCategory objects public RecordCategories getRecordCategories(ClassificationScheme aoCS) { RecordCategories loRCs = (RecordCategories)aoCS.getContainees(new int[]{RMType.RM_TYPE_RECORDCATEGORY}); return loRCs; }
//Retrieves RecordCategory objects public RecordCategories getRecordCategories(RMObjectStore aoRMOS, RecordInfo aoRecord) { RecordCategories loRCs = aoRecord.getParentRecordCategories(); return loRCs; }
//Retrieves RecordCategory objects public RecordCategory getRecordCategory(RecordFolder aoRF) { RecordCategory loRC = (RecordCategory)aoRF.getParentFolder(); // where aoRF is an object of RecordFolder, which is directly contained in a // RecordCategory object return loRC; }
//Retrieves RecordCategory objects public RMObjects getContainers(RMObjectStore aoRMOS, RecordInfo aoRecord) { Folders loObjs = aoRecord.getContainers(); RMObjects loRCs = aoRMOS.getRMObjects(); Iterator loIterator = loObjs.iterator(); while (loIterator.hasNext()) { Folder loFolder = (Folder)loIterator.next(); if (loFolder instanceof RecordCategory) { loRCs.add(loFolder); } } return loRCs; }