public class SnapLockMediaDriver extends Object implements CustomMediaDriver
The secure parameters of the CustomMedia instance hold the user name and
password used to authenticate to the SnapLock device. Refer to the constants
whose names start with SECUREPARAMETER_
.
The properties of the CustomMedia instance control other configuration of
the SnapLockMediaDriver instance. Refer to the constants whose names start
with PROPERTY_
.
Modifier and Type | Field and Description |
---|---|
static String |
MEDIAOPTION_FILENAME
The name of the media option whose string value is the filename in which
content will be stored on the SnapLock device.
|
static String |
MEDIAOPTION_RELATIVE_PATH
The name of the media option whose string value is the path of the
directory in which the content will be stored, relative to the export
path on the SnapLock device (or equivalently, relative to the mount
path on the content management server).
|
static String |
MEDIAOPTION_RETENTION_PERIOD
The name of the media option whose long value specifies the retention
period of the content, in seconds since 1970-01-01 00:00:00Z.
|
static String |
PROPERTY_EXPORT_PATH
The name of the MediaCustom property whose string value is the export
path.
|
static String |
PROPERTY_HOSTNAME
The name of the MediaCustom property whose string value is the hostname
of the SnapLock device.
|
static String |
PROPERTY_MOUNT_PATH
The name of the MediaCustom property whose string value is the mount
path.
|
static String |
PROPERTY_PORT
The name of the MediaCustom property whose integer value is the port
number of the SnapLock device.
|
static String |
SECUREPARAMETER_PASSWORD
The name of the MediaCustom secure parameter whose string value is the
password used to authenticate to the SnapLock device.
|
static String |
SECUREPARAMETER_USER_NAME
The name of the MediaCustom secure parameter whose string value is the
user name used to authenticate to the SnapLock device.
|
Constructor and Description |
---|
SnapLockMediaDriver() |
Modifier and Type | Method and Description |
---|---|
void |
destroyContent(S_MediaCustom media,
String address,
Long cid,
AttributeValue[] mediaOptions)
Destroys content with the specified content address.
|
InputStream |
getContent(S_MediaCustom media,
String address)
Gets the content for the specified content address.
|
long |
getContentSize(S_MediaCustom media,
String address)
Gets the content size, in bytes, for the specified content address.
|
RandomAccessDriver |
getRandomAccessorDriver(S_MediaCustom media,
String address)
Gets a RandomAccessDriver for the specified content address.
|
void |
initialize(S_CustomMediaDriverSpecification cmds)
Initializes this CustomMediaDriver.
|
String |
setContent(S_MediaCustom media,
Long cid,
InputStream is,
AttributeValue[] mediaOptions)
Stores content from the supplied InputStream.
|
String |
setContentReference(S_MediaCustom media,
Long cid,
String contentReference,
AttributeValue[] mediaOptions)
Stores content determined from a specified content reference.
|
public static final String SECUREPARAMETER_USER_NAME
public static final String SECUREPARAMETER_PASSWORD
public static final String PROPERTY_HOSTNAME
public static final String PROPERTY_PORT
public static final String PROPERTY_EXPORT_PATH
The export path is the actual absolute path on the SnapLock device of an exported volume (or a directory within a volume).
public static final String PROPERTY_MOUNT_PATH
The mount path is the absolute path at which the exported volume (or directory within a volume) is mounted on the content management server.
A path relative to the mount path on the content management server must identify the same directory or file as the same path relative to the export path identifies on the SnapLock device.
public static final String MEDIAOPTION_RELATIVE_PATH
This media option is examined when setContent
is called to
store content in SnapLock. If unspecified, content will be stored the
volume or directory specified by the export path.
ContentObjectDefinition.setMediaOptions(AttributeValue[])
,
Constant Field Valuespublic static final String MEDIAOPTION_FILENAME
This media option is examined when setContent
is called to
store content in SnapLock. If unspecified, the filename will be
"oracle_ifs_cid
", where cid
is
the unique content id.
ContentObjectDefinition.setMediaOptions(AttributeValue[])
,
Constant Field Valuespublic static final String MEDIAOPTION_RETENTION_PERIOD
This media option is examined when setContent
is called to
store content in SnapLock. If unspecified, SnapLock will apply a default
retention period (which may be 0).
ContentObjectDefinition.setMediaOptions(AttributeValue[])
,
Constant Field Valuespublic void initialize(S_CustomMediaDriverSpecification cmds) throws IfsException
initialize
in interface CustomMediaDriver
cmds
- the CustomMediaDriver specificationIfsException
- 13800: if the operation failspublic InputStream getContent(S_MediaCustom media, String address) throws IfsException
getContent
in interface CustomMediaDriver
media
- the MediaCustom instanceaddress
- the content addressIfsException
- 13801: if the operation failspublic long getContentSize(S_MediaCustom media, String address) throws IfsException
getContentSize
in interface CustomMediaDriver
media
- the MediaCustom instanceaddress
- the content addressIfsException
- 13802: if the operation failspublic String setContent(S_MediaCustom media, Long cid, InputStream is, AttributeValue[] mediaOptions) throws IfsException
setContent
in interface CustomMediaDriver
media
- the MediaCustom instancecid
- the content idis
- the contentmediaOptions
- a set of name/value pairs whose semantics are
determined by the CustomMediaDriver implementation,
or null for no media optionsIfsException
- 13803: if the operation failspublic String setContentReference(S_MediaCustom media, Long cid, String contentReference, AttributeValue[] mediaOptions) throws IfsException
The interpretation of contentReference
is determined by
the CustomMediaDriver implementation. Some implementations may store
its value, while others may resolve its value (in a implementation
determined fashion) to other content and store that content instead.
setContentReference
in interface CustomMediaDriver
media
- the MediaCustom instancecid
- the content idcontentReference
- the content referencemediaOptions
- a set of name/value pairs whose semantics are
determined by the CustomMediaDriver
implementation, or null for no media optionsIfsException
- 13804: if the operation failspublic RandomAccessDriver getRandomAccessorDriver(S_MediaCustom media, String address) throws IfsException
getRandomAccessorDriver
in interface CustomMediaDriver
media
- the MediaCustom instanceaddress
- the content addressIfsException
- 13805: if the operation failspublic void destroyContent(S_MediaCustom media, String address, Long cid, AttributeValue[] mediaOptions) throws IfsException
destroyContent
in interface CustomMediaDriver
media
- the MediaCustom instanceaddress
- the content addresscid
- the content idmediaOptions
- a set of name/value pairs whose semantics are
determined by the CustomMediaDriver implementation,
or null for no media optionsIfsException
- 13806: if the operation failsCopyright © 2023. All rights reserved.