A Volume object represents a logical subdivision of a record folder into a smaller, more easily-managed unit. A Volume object has no existence independent of the record folder.
A record folder always contains at least one volume. However, you can create multiple volumes in a record folder. When a record folder is created, the first volume is automatically created by default. The first volume remains open unless a second volume is created. When the second volume is created, the first volume is closed and the second volume remains open.
The name of a volume consists of a prefix and a suffix separated by a hyphen (-). The prefix is the parent record folder name, and the suffix is an incremental number, which is configured as VolumePatternSuffix in the system configuration. For example, if the record folder name is RF1 and the VolumePatternSuffix value is set as 0000, the volume name will be RF1-0001. However, a volume cannot be categorized as physical, electronic, or hybrid. The type of the volume is determined by the type of its parent record folder.
//Creates a Volume object
public void createVolume(String asName, Properties aoProps, Permissions aoACLs,
RecordFolder aoParentRF)
{
Volume loVol = aoParentRF.addVolume(aoProps, aoACLs);
}
You can retrieve Volume objects in the following ways:
//Retrieves a Volume object
public Volume getVolume(RMObjectStore aoRMOS, String asVolGUID)
{
Volume loVol = (Volume)aoRMOS.getObject( RMType.RM_TYPE_VOLUME, asVolGUID);
return loVol;
}
//Retrieves a Volume object
public Volume getVolume(RMObjectStore aoRMOS, String asVolGUID)
{
Folder loFolder = (Folder)aoRMOS.getObject( BaseObject.TYPE_FOLDER, asVolGUID);
Volume loVol = aoRMOS.getVolumeInterface(loFolder);
return loVol;
}
//Retrieves Volume objects
public Volumes getVolumes(RecordFolder aoRF)
{
Volumes loVols =
(Volumes)aoRF.getContainees(new int[]{RMType.RM_TYPE_VOLUME});
return loVols;
}
//Retrieves Volume objects
public RMObjects getContainers(RMObjectStore aoRMOS, RecordInfo aoRecord)
{
Folders loObjs = aoRecord.getContainers();
RMObjects loVols = aoRMOS.getRMObjects();
Iterator loIterator = loObjs.iterator();
while (loIterator.hasNext())
{
Folder loFolder = (Folder)loIterator.next();
if (loFolder instanceof Volume)
{
loVols.add(loFolder);
}
}
return loVols;
}