public final class Engine
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BUILD_DATE_PROPERTY
build date property.
|
static java.lang.String |
CACHE_POLICY_PROPERTY
tells how links are cached.
|
static java.lang.String |
HTTP_CONNECTION_TIMEOUT_PROPERTY
type is Integer
|
static java.lang.String |
HTTP_IO_TIMEOUT_PROPERTY
type is Integer
|
static java.lang.String |
HTTP_PROXY_ENABLED_PROPERTY
type is Boolean
|
static java.lang.String |
HTTP_PROXY_HOST_NAME_PROPERTY
type is String
|
static java.lang.String |
HTTP_PROXY_PORT_PROPERTY
type is Integer
|
static java.lang.String |
HTTP_PROXY_SYSTEM_DEFAULT_PROPERTY
type is Boolean
|
static java.lang.String |
HTTPS_PROXY_HOST_NAME_PROPERTY
type is String
|
static java.lang.String |
HTTPS_PROXY_PORT_PROPERTY
type is Integer
|
static java.lang.String |
IS_PERSONALIZED_PROPERTY
type is Boolean
|
static java.lang.String |
NEMO_PROPERTY
type is com.intertrust.wasabi.Attribute
|
static java.lang.String |
PERSONALITY_PROPERTY
type is com.intertrust.wasabi.Attribute
|
static java.lang.Integer |
POLICY_DO_NOT_RELOAD_LINKS
value for the CACHE_POLICY_PROPERTY.
|
static java.lang.Integer |
POLICY_RELOAD_LINKS
value for the CACHE_POLICY_PROPERTY (default).
|
static java.lang.String |
PREFERRED_LANGUAGES_PROPERTY
type is String[]
|
static int |
VACUUM_FLAG_DONT_SAVE_RECENT_LINK
when used in conjunction with VACUUM_FLAG_LINKS, forces the removal of
the most recent Link.
|
static int |
VACUUM_FLAG_LINKS
cleans up any Octopus Link which expiration date has passed except the
most recent one for each type
|
static int |
VACUUM_FLAG_NODES
cleans up any Octopus Node which expiration date has passed
|
static int |
VACUUM_FLAG_SEASHELL
cleans up Seashell Objects which expiration date has passed
|
static int |
VACUUM_FLAG_WIPE
use with caution! Wipes all the objects except the Personality.
|
static java.lang.String |
VERSION_PROPERTY
type is Integer
|
Constructor and Description |
---|
Engine()
Create a new instance of the Engine class.
|
Modifier and Type | Method and Description |
---|---|
void |
addTransactionListener(TransactionListener listener)
adds a transaction listener.
|
void |
destroy()
destroys the engine.
|
java.lang.String[] |
getLinkIds()
gets all the IDs of the Links that the engine has access to
|
java.lang.String[] |
getNodeIds()
gets all the IDs of the Nodes that the engine has access to
|
Attribute |
getObjectDetails(java.lang.String objectId)
returns detailed information about the Object whose ID is specified such
as its attributes and more.
|
java.lang.Object |
getProperty(java.lang.String name)
gets the value of a property of the engine.
|
java.lang.String[] |
getPropertyNames()
gets all the engine property name
|
Service[] |
getServices()
gets the list of the services that are currently configured for this
engine.
|
DateTime |
getTrustedTime()
gets the current value of the trusted time
|
boolean |
isPersonalized()
indicates whether or not this engine has been personalized
|
void |
personalize(java.lang.String personalizationToken)
requests that the engine engage in the personalization process.
|
void |
processServiceToken(java.lang.String actionToken)
requests that the engine process a service token.
|
void |
removeTransactionListener(TransactionListener listener)
removes a transaction listener.
|
void |
setProperty(java.lang.String name,
java.lang.Object property)
sets the value of a property of the engine.
|
java.lang.String |
transformUriTemplate(java.lang.String template)
transforms a URI template according to the "URI Templates for Marlin"
specification
|
void |
updatePersonality(java.lang.String updatePersonalityToken)
requests that the engine engage in the update personality.
|
void |
updateSecurityData(java.lang.String serviceId,
int lastUpdate)
updates security data for a specified service configured for this engine
object
|
void |
vacuumData(int flags)
removes expired data stored in the DRM database.
|
public static final int VACUUM_FLAG_NODES
public static final int VACUUM_FLAG_LINKS
public static final int VACUUM_FLAG_SEASHELL
public static final int VACUUM_FLAG_DONT_SAVE_RECENT_LINK
public static final int VACUUM_FLAG_WIPE
public static final java.lang.Integer POLICY_DO_NOT_RELOAD_LINKS
public static final java.lang.Integer POLICY_RELOAD_LINKS
public static final java.lang.String BUILD_DATE_PROPERTY
public static final java.lang.String CACHE_POLICY_PROPERTY
public static final java.lang.String HTTP_CONNECTION_TIMEOUT_PROPERTY
public static final java.lang.String HTTP_IO_TIMEOUT_PROPERTY
public static final java.lang.String HTTP_PROXY_ENABLED_PROPERTY
public static final java.lang.String HTTP_PROXY_HOST_NAME_PROPERTY
public static final java.lang.String HTTP_PROXY_PORT_PROPERTY
public static final java.lang.String HTTP_PROXY_SYSTEM_DEFAULT_PROPERTY
public static final java.lang.String HTTPS_PROXY_HOST_NAME_PROPERTY
public static final java.lang.String HTTPS_PROXY_PORT_PROPERTY
public static final java.lang.String IS_PERSONALIZED_PROPERTY
public static final java.lang.String PERSONALITY_PROPERTY
public static final java.lang.String NEMO_PROPERTY
public static final java.lang.String PREFERRED_LANGUAGES_PROPERTY
public static final java.lang.String VERSION_PROPERTY
public Engine() throws ErrorCodeException
Note that having a listener that properly detects any
transaction failure is essential for the error handling in the
client application code. See TransactionListener
for
pseudo code of a listener that captures any transaction
failure.
ErrorCodeException
public java.lang.String[] getLinkIds() throws ErrorCodeException
ErrorCodeException
public java.lang.String[] getNodeIds() throws ErrorCodeException
ErrorCodeException
public java.lang.String[] getPropertyNames() throws ErrorCodeException
ErrorCodeException
public DateTime getTrustedTime() throws ErrorCodeException
ErrorCodeException
public boolean isPersonalized()
public void personalize(java.lang.String personalizationToken) throws ErrorCodeException, java.lang.NullPointerException
Note that having a listener that properly detects any
transaction failure is essential for the error handling in the
client application code. See TransactionListener
for
pseudo code of a listener that captures any transaction
failure.
personalizationToken
- can be nullErrorCodeException
- if the engine has already been personalizedjava.lang.NullPointerException
- if the the personalizationToken parameter is nullpublic void updatePersonality(java.lang.String updatePersonalityToken) throws ErrorCodeException
Note that having a listener that properly detects any
transaction failure is essential for the error handling in the
client application code. See TransactionListener
for
pseudo code of a listener that captures any transaction
failure.
updatePersonalityToken
- can be nullErrorCodeException
- if the engine is not able to update personalitypublic void processServiceToken(java.lang.String actionToken) throws ErrorCodeException
Note that having a listener that properly detects any
transaction failure is essential for the error handling in the
client application code. See TransactionListener
for
pseudo code of a listener that captures any transaction
failure.
actionToken
- cannot be nullErrorCodeException
- if the transaction cannot be launchedjava.lang.NullPointerException
- if the actionToken parameter is nullpublic java.lang.String transformUriTemplate(java.lang.String template) throws ErrorCodeException, java.lang.NullPointerException
template
- cannot be nullErrorCodeException
java.lang.NullPointerException
- if the template paratemer is nullpublic void updateSecurityData(java.lang.String serviceId, int lastUpdate) throws ErrorCodeException, java.lang.NullPointerException
Note that having a listener that properly detects any
transaction failure is essential for the error handling in the
client application code. See TransactionListener
for
pseudo code of a listener that captures any transaction
failure.
serviceId
- ID of the service whose security data will be updated (cannot
be null)lastUpdate
- if an update has occurred within the last lastUpdate seconds,
the security data will not be updated when the function is
called. Callers can pass 0 to mean update regardless of the
when the last update occurred.ErrorCodeException
java.lang.NullPointerException
- if the serviceId parameter is nullpublic void vacuumData(int flags) throws ErrorCodeException
flags
- a combination of flags (example:
VACUUM_FLAG_NODES|VACUUM_FLAG_LINKS)ErrorCodeException
public Attribute getObjectDetails(java.lang.String objectId) throws ErrorCodeException, java.lang.NullPointerException
objectId
- the ID of the requested Octopus Object. Cannot be null.ErrorCodeException
- if this object is not foundjava.lang.NullPointerException
- if the objectId parameter is nullpublic Service[] getServices() throws ErrorCodeException
ErrorCodeException
public java.lang.Object getProperty(java.lang.String name) throws ErrorCodeException, java.lang.NullPointerException
name
- the property name (cannot be null)ErrorCodeException
- if the property does not existjava.lang.NullPointerException
- if the name parameter is nullpublic void setProperty(java.lang.String name, java.lang.Object property) throws ErrorCodeException, java.lang.NullPointerException
name
- name of the property (cannot be null)property
- value of the property (cannot be null)ErrorCodeException
- if this property does not exist, cannot be set or if the
value is of the wrong typejava.lang.NullPointerException
- if any of the parameters is nullpublic void destroy()
public void addTransactionListener(TransactionListener listener) throws java.lang.NullPointerException
Note that having a listener that properly detects any
transaction failure is essential for the error handling in the
client application code. See TransactionListener
for
pseudo code of a listener that captures any transaction
failure.
listener
- (cannot be null)java.lang.NullPointerException
- if the listener parameter is nullpublic void removeTransactionListener(TransactionListener listener) throws java.lang.NullPointerException
Note that having a listener that properly detects any
transaction failure is essential for the error handling in the
client application code. See TransactionListener
for
pseudo code of a listener that captures any transaction
failure.
listener
- (cannot be null)java.lang.NullPointerException
- if the listener parameter is null