|
FileNet Content Services Java Connector v3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An object implementing the ReadableMetadataObject
interface is
an object for which metadata (including properties, but not permissions) can
be examined.
Field Summary |
Method Summary | |
Properties |
getProperties()
Returns all the properties for this ReadableMetadataObject object.
|
Properties |
getProperties(java.lang.String[] propNames)
Returns the requested properties for this ReadableMetadataObject object. |
java.lang.String |
getPropertiesXML(java.lang.String[] propNames)
Returns a string in XML that represents the requested properties for this ReadableMetadataObject object. |
byte[] |
getPropertyBinaryValue(java.lang.String name)
Returns the value--cast or converted to a byte array--of the
named property for this ReadableMetadataObject .
|
boolean |
getPropertyBooleanValue(java.lang.String name)
Returns the value--cast or converted to a boolean --of the
named property for this ReadableMetadataObject . |
java.util.Date |
getPropertyDateValue(java.lang.String name)
Returns the value--cast or converted to a Date --of the
named property for this ReadableMetadataObject .
|
double |
getPropertyDoubleValue(java.lang.String name)
Returns the value--cast or converted to a double --of the
named property for this ReadableMetadataObject .
|
int |
getPropertyIntValue(java.lang.String name)
Returns the value--cast or converted to an int--of the named property for this ReadableMetadataObject .
|
java.lang.String |
getPropertyStringValue(java.lang.String name)
Returns the value--cast or converted to a String --of the
named property for this ReadableMetadataObject .
|
java.lang.Object |
getPropertyValue(java.lang.String name)
Returns the value of the named property as an Object
for this ReadableMetadataObject . |
Values |
getPropertyValuesValue(java.lang.String name)
Returns the value--cast or converted to a Values
collection--of the named property for this ReadableMetadataObject .
|
void |
refresh()
Deletes data stored in cache. |
void |
refresh(java.lang.String[] staleProperties)
Behaves like refresh() , except that only the specifically-named
properties are removed from the locally-cached data.
|
Methods inherited from interface com.filenet.wcm.api.BaseObject |
equals, exportObject, getClassId, getId, getName, getObjectStoreId, getObjectType, getSession, hashCode, thisBaseObject |
Method Detail |
public Properties getProperties() throws PropertyNotFoundException
ReadableMetadataObject
object.
Note that if the object implementing this ReadableMetadataObject
object is a ChoiceList
object, the ChoiceList
object must be a top-level choice list (and not a contained choice list).
The object implementing the ReadableMetadataObject
interface
caches the results from a call to the getProperties
method. If properties from a previous call were cached, this method
attempts to eliminate network roundtrips to the server on subsequent
calls by retrieving the cached values for the properties.
To retrieve a specific set of properties, use the
getProperties(propNames)
form of this method.
Properties
collection that contains all the properties for
this ReadableMetadataObject
object.
PropertyNotFoundException
- Thrown when this
method is unable to retrieve properties for this ReadableMetadataObject
object from the Content Services server.
public Properties getProperties(java.lang.String[] propNames) throws PropertyNotFoundException
ReadableMetadataObject
object. If the
propNames
parameter is null
or an empty array,
this method returns all
properties for this ReadableMetadataObject
object.
The Property
elements in the collection are
returned in the same order as their corresponding elements in the specified
propNames
array.
Note that if the object implementing this ReadableMetadataObject
object is a ChoiceList
object, the ChoiceList
object must be a top-level choice list (and not a contained choice list).
The object implementing the ReadableMetadataObject
interface
caches the results from a call to the getProperties
method. If properties from a previous call were cached, this method
attempts to eliminate network roundtrips to the server on subsequent calls
by retrieving the cached values for the requested properties.
To retrieve all properties for the object, use
getProperties()
.
propNames
- A String array whose elements specify the
symbolic names of the properties to retrieve.
If null
or an empty array, retrieves all properties.
However, if you pass in a null
, you must first
explicitly cast it to a String[] to avoid a compilation error.
Properties
collection that contains the requested properties
for this ReadableMetadataObject
object.
PropertyNotFoundException
- Thrown when this
method is unable to retrieve the specified properties from the
Content Services server.
public java.lang.Object getPropertyValue(java.lang.String name) throws PropertyNotFoundException
Object
for this ReadableMetadataObject
. If the property is a
multi-valued property, the returned object is a Values
collection, which will contain one or more Value
objects.
name
- A String
that is the symbolic name of the property for
which the value is to be retrieved. (The Property
interface has constants for well-known properties.)
Object
that is the value for the property specified
in the name
parameter. Returns null
when
the property value has not been set in the Content Services server.
PropertyNotFoundException
- Thrown when the named property does not exist
for this ReadableMetadataObject
object.public boolean getPropertyBooleanValue(java.lang.String name) throws PropertyNotFoundException
boolean
--of the
named property for this ReadableMetadataObject
. If the
value is null
, which means the property
was not populated in the Content Services, this method returns false
.
(See Property.hasNullValue
for more information on null
property values.)
name
- A String
that is the symbolic name of the property for
which the value is to be retrieved. (The Property
interface has constants for well-known properties.)
boolean
that is the value for the property specified
in the name
parameter. Returns false
in the case
of a null
value.
PropertyNotFoundException
- Thrown when the named property does not exist
for this ReadableMetadataObject
object.public byte[] getPropertyBinaryValue(java.lang.String name) throws PropertyNotFoundException
byte
array--of the
named property for this ReadableMetadataObject
.
name
- A String
that is the symbolic name of the property for which
the value is to be retrieved. (The Property
interface has constants for well-known properties.)
byte
array of binary values for the property
specified in the name
parameter.
PropertyNotFoundException
- Thrown when the named property does not exist
for this ReadableMetadataObject
object.public java.util.Date getPropertyDateValue(java.lang.String name) throws PropertyNotFoundException
Date
--of the
named property for this ReadableMetadataObject
.
name
- A String
that is the symbolic name of the property for
which the value is to be retrieved. (The Property
interface has constants for well-known properties.)
Date
that is the value for the property specified
in the name
parameter. Returns null
when the
property value has not been set in the Content Services server.
PropertyNotFoundException
- Thrown when the named property does not exist
for this ReadableMetadataObject
object.public double getPropertyDoubleValue(java.lang.String name) throws PropertyNotFoundException
double
--of the
named property for this ReadableMetadataObject
.
If the value is null
, which means the property
was not populated in the Content Services server, this method returns
Double.NaN
.
(See Property.hasNullValue
for more information on null
property values.)
name
- A String
that is the symbolic name of the property for
which the value is to be retrieved. (The Property
interface has constants for well-known properties.)
double
that is the value for the property specified
in the name
parameter. Returns Double.NaN
in the case of a null
value.
PropertyNotFoundException
- Thrown when the named property does not exist
for this ReadableMetadataObject
object.public int getPropertyIntValue(java.lang.String name) throws PropertyNotFoundException
ReadableMetadataObject
.
If the value is null
, which means the property
was not populated in the Content Services server, this method returns
Integer.MIN_VALUE
.
(See Property.hasNullValue
for more information on null
property values.)
name
- A String that is the symbolic name of the property for
which the value is to be retrieved. (The Property
interface has constants for well-known properties.)
int
that is the value for the property specified
in the name
parameter. Returns Integer.MIN_VALUE
in the case of a null
value.
PropertyNotFoundException
- Thrown when the named property does not exist
for this ReadableMetadataObject
object.public java.lang.String getPropertyStringValue(java.lang.String name) throws PropertyNotFoundException
String
--of the
named property for this ReadableMetadataObject
.
The returned value is
null
if the property's value was not set in the Content Services server.
(See Property.hasNullValue
for more information on null
property values.)
name
- A String
that is the symbolic name of the property for
which the value is to be retrieved. (The Property
interface has constants for well-known properties.)
String
that is the value for the property specified
in the name
parameter. Returns null
when
the property value has not been set in the Content Services server.
PropertyNotFoundException
- Thrown when the named property does not exist
for this ReadableMetadataObject
object.public Values getPropertyValuesValue(java.lang.String name) throws PropertyNotFoundException
Values
collection--of the named property for this ReadableMetadataObject
.
name
- A String that is the symbolic name of the property for
which the values are to be retrieved. (The Property
interface has constants for well-known properties.)
Values
collection that is the value for the property
specified in the name
parameter.
PropertyNotFoundException
- Thrown when the named property does not exist
for this ReadableMetadataObject
object.public void refresh()
Document
object and then retrieving properties from a
VersionSeries
object (or vice versa), you should call
refresh
before attempting to retrieve the properties (or
before calling a convenience method, such as getCurrentVersion
,
that retrieves a property). Because a VersionSeries
object and
any Document
objects obtained from it are separate, unrelated
Java objects, state changes that occur because of a versioning-related
operation on one object will not be reflected in the other object's
cached properties.
After a call to refresh
, references to property collections
and other objects currently held by
objects external to the CS Java Connector remain valid. However,
those references have been released by the API.
For example, assume that your application has a copy of the Document
property, idmDocCurVerNum, and is performing some checkout/checkin
activity. A call to refresh
deletes the data stored in the cache,
which forces the retrieval of fresh data (including the idmDocCurVerNum
property with its current value) by a subsequently-called method that
requests data.
However, the copy of the property held by your application is now stale.
As a result, your application may experience semantic errors
because the application is now working with stale data.
public void refresh(java.lang.String[] staleProperties)
refresh()
, except that only the specifically-named
properties are removed from the locally-cached data.
staleProperties
- A String array of property symbolic names.public java.lang.String getPropertiesXML(java.lang.String[] propNames)
ReadableMetadataObject
object. If the propNames
parameter is null
or an empty array, this method returns all properties
for this ReadableMetadataObject
object. If the array includes
properties that do not exist for this ReadableMetadataObject
object,
those properties are ignored (no exception is thrown).
This method's results are never cached (unlike the non-XML forms of the
getProperties
method). Also, this method always makes a
roundtrip to the Content Services server and
never uses cached properties.
propNames
- A String array whose elements specify the
symbolic names of the properties to retrieve.
If null
or an empty array, retrieves all properties.
However, if you pass in a null
, you must first
explicitly cast it to a String[] to avoid a compilation error.
ReadableMetadataObject
object.
|
FileNet Content Services Java Connector v3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |