Skip navigation links

Oracle® Information Rights Management Server Java API Reference
11g Release 1 (11.1.1)

E12907-03


oracle.irm.engine.core.status
Interface StatusPageOperations


public interface StatusPageOperations

Operations relating to the status pages. Status pages are displayed when the desktop wishes to inform the user that some event has occurred. For example, status pages are displayed when the user does not have the rights to open content, or when the server is forcing the user to upgrade the server desktop software. The desktop also provides equivalent off-line status pages when the server cannot be accessed.

The desktop finds out the location of the desktop web site by examining the Uri sealed into content.

The user does not need to authenticate to access the status pages.

Instance

The methods on StatusPageOperations can be invoked using StatusPageOperationsInstance.


Field Summary
static String APPLICATION_CONTAINER_PARAMETER
          The container application parameter.
static String APPLICATION_NAME_PARAMETER
          The application name parameter.
static String DESKTOP_OPERATING_SYSTEM_PARAMETER
          The desktop operating system parameter.
static String DESKTOP_UUID_PARAMETER
          The desktop UUID parameter.
static String DESKTOP_VERSION_PARAMETER
          The desktop version parameter.
static String PAGE_PARAMETER
          The page parameter.

 

Method Summary
 DesktopState extractStateFromBody(InputStream stream)
          Extract the classification from a HTTP body.
 String getRedirectionParameter(String parameter, Locale locale, StatusPageRequest.StatusPage page, DesktopState state)
          Gets the value for the status page redirection URI parameter given.
 Label getStatusLabel(Locale locale, StatusPageRequest.StatusPage page, DesktopState state)
          Get a caption and description for a status page.
 ContentType getStatusPageContentType(DesktopState state)
          Gets the appropriate content type from the desktop state.
 StatusPageRequest.StatusPage getStatusPageFromQuery(String query)
          Extract the status page from a query.
 StatusPageInformation getStatusPageInformation(Locale locale, StatusPageRequest.StatusPage page, DesktopState state)
          Obtain status page information.
 Collection<HyperLink> getStatusPageLinks(Locale locale, StatusPageRequest.StatusPage page, DesktopState state)
          Get status page links.
 StatusPageResponse getStatusPageResponse(String query, DesktopState state)
          Obtain a status page response.
 URI getStatusPageURI(URI uri, StatusPageRequest.StatusPage page)
          Get the full URI for a status page.
 void insertStateIntoBody(DesktopState state, OutputStream stream)
          Create the response body for a status page.
 URI populateRedirectionURI(URI uri, Locale locale, String query, DesktopState state)
          Populates a status page redirection URI with all of the requested parameters.

 

Field Detail

APPLICATION_CONTAINER_PARAMETER

static final String APPLICATION_CONTAINER_PARAMETER
The container application parameter. The parameter name used for the container application in status page redirection URI query strings. The container application can be considered the application hosting the desktop logic - such as a browser or word processor. Value: "application.container"
See Also:
Constant Field Values

APPLICATION_NAME_PARAMETER

static final String APPLICATION_NAME_PARAMETER
The application name parameter. The parameter name used for the application name in status page redirection URI query strings. The application name can be used to identify the application used to access the sealed content. Value: "application.name"
See Also:
Constant Field Values

DESKTOP_OPERATING_SYSTEM_PARAMETER

static final String DESKTOP_OPERATING_SYSTEM_PARAMETER
The desktop operating system parameter. The parameter name used for the desktop operating system in status page redirection URI query strings. The value can be used to determine the operating system that is hosting the desktop logic. Value: "desktop.operating.system"
See Also:
Constant Field Values

DESKTOP_UUID_PARAMETER

static final String DESKTOP_UUID_PARAMETER
The desktop UUID parameter. The parameter name used for the desktop UUID in status page redirection URI query strings. The desktop UUID is used to identify a particular desktop independently of the product version number. Value: "desktop.uuid"
See Also:
Constant Field Values

DESKTOP_VERSION_PARAMETER

static final String DESKTOP_VERSION_PARAMETER
The desktop version parameter. The parameter name used for the desktop version in status page redirection URI query strings. The desktop version identifies the product version of the desktop used to access the sealed content. Value: "desktop.version"
See Also:
Constant Field Values

PAGE_PARAMETER

static final String PAGE_PARAMETER
The page parameter. The parameter name used for the status page in status page redirection URI query strings. Each page is identified by a StatusPageRequest.StatusPage. Value: "page"
See Also:
Constant Field Values

Method Detail

getStatusPageURI

URI getStatusPageURI(URI uri,
                     StatusPageRequest.StatusPage page)
Get the full URI for a status page. A Classification only contains the root URI for the desktop web site. This method allows the full URI to be determined for a given classification and status page.

e.g. for the license expired status page the information URI would be prepending with /info?page=LICENSE_EXPIRED.

To obtain the status page a HTTP POST should be made to the URI. The body of the HTTP request should contain the XML representation of the classification. The content type should be set as 'application/xml'.

The insertStateIntoBody method can be used to transform a DesktopState into XML and stream it into an output stream.
Parameters:
uri - the information URI.
page - the status page.
Returns:
the URI that can be used to obtain the status page. This method will never return null.
See Also:
getStatusPageFromQuery

getStatusPageFromQuery

StatusPageRequest.StatusPage getStatusPageFromQuery(String query)
Extract the status page from a query. Extract the status page details from a query POSTed from the desktop. Once the status page has been identified the desktop details can be extracted from the HTTP body using extractStateFromBody.
Parameters:
query - the decoded query. If no query string is provided, or it does not match a valid status page then the status page of UNKNOWN is returned. This parameter is optional, it is valid to pass null.
Returns:
the status page requested. This method will never return null.
See Also:
getStatusPageURI

insertStateIntoBody

void insertStateIntoBody(DesktopState state,
                         OutputStream stream)
                         throws IOException
Create the response body for a status page. To obtain the status page a client would perform a HTTP POST to the desktop web site. The body of the HTTP request should contain the XML representation of the DesktopState. This method can be used to stream the DesktopState into a HTTP response output stream.

The content type should be set as 'application/xml'.
Parameters:
state - the desktop state.
stream - the output stream.
Throws:
IOException - output stream exception.
See Also:
extractStateFromBody

extractStateFromBody

DesktopState extractStateFromBody(InputStream stream)
                                  throws IOException
Extract the classification from a HTTP body. A request for a status page will include the desktop state in the HTTP body. This method can be used to read the HTTP request input stream and recreate the DesktopState sent from the client.
Parameters:
stream - the input stream.
Returns:
the desktop state. This method will never return null.
Throws:
IOException - there was a problem reading the state from the input stream.
See Also:
insertStateIntoBody

getStatusLabel

Label getStatusLabel(Locale locale,
                     StatusPageRequest.StatusPage page,
                     DesktopState state)
Get a caption and description for a status page. When displaying a status page a status caption is displayed along with a longer description of what the status means. This method returns a localized caption and description which can be displayed on the appropriate HTML status page.
Parameters:
locale - required locale. The locale to render the status page name and description.
page - the status page.
state - desktop state. The state of the desktop when the status page was requested.
Returns:
the caption and description for the status page. This method will never return null.

getStatusPageLinks

Collection<HyperLink> getStatusPageLinks(Locale locale,
                                         StatusPageRequest.StatusPage page,
                                         DesktopState state)
Get status page links. The standard status page provides a number of links that are useful to a desktop user. These include information about sealed content and help. This method allows this standard links to be obtained and used to create a StatusPageInformation instance.
Parameters:
locale - required locale. The locale to render the status page link details.
page - the status page.
state - desktop state. The state of the desktop when the status page was requested.
Returns:
the status page links. If applicable, this method will return an empty collection rather than null to indicate no results.

getStatusPageInformation

StatusPageInformation getStatusPageInformation(Locale locale,
                                               StatusPageRequest.StatusPage page,
                                               DesktopState state)
                                               throws StatusPageRedirectException
Obtain status page information. Some of the information displayed on a status page cannot be obtained directly from DesktopState, as provided by the desktop. Additional information can be obtained using this method. This additional information includes things such as a company name, classification name and description, content details and further assistance links.

The following status pages will never return assistance links as they are deemed to be normal desktop behaviour and do not require a contact to be given: LICENSES_CHECKED_IN, LICENSE_CHANGED, MOVIE_AFTER_MOVIE, MOVIE_BEFORE_MOVIE.
Parameters:
locale - required locale. The locale to render the status page details.
page - the status page.
state - desktop state. The state of the desktop when the status page was requested.
Returns:
the status page information details. This method will never return null.
Throws:
StatusPageRedirectException - if the status page is provided by an external web page.

getStatusPageContentType

ContentType getStatusPageContentType(DesktopState state)
Gets the appropriate content type from the desktop state. Determines the correct content type to be used when generating a status page from the given desktop state.
Parameters:
state - the desktop state.
Returns:
the content type to use on the status page. This method will never return null.

getStatusPageResponse

StatusPageResponse getStatusPageResponse(String query,
                                         DesktopState state)
                                         throws StatusPageRedirectException,
                                                IOException
Obtain a status page response. Some information displayed on a status page is derived from the provided DesktopState. This additional information could include things such as a company name, classification name and description, content details and further assistance links. The response also includes a localized version of the status.
Parameters:
query - the query string. This string identifies the status page requested. This parameter is optional, it is valid to pass null.
state - desktop state. The state of the desktop when the status page was requested.
Returns:
the status page response details. This method will never return null.
Throws:
StatusPageRedirectException - if the status page is provided by an external web page.
IOException - in an input/output error occurred reading the HTTP request body.

populateRedirectionURI

URI populateRedirectionURI(URI uri,
                           Locale locale,
                           String query,
                           DesktopState state)
                           throws IOException
Populates a status page redirection URI with all of the requested parameters. Fills all recognised parameters in the URI query string that have no value. For example http://irm.example.com/status?irm-locale= will have irm-locale filled in with the correct value giving something like http://irm.example.com/status?irm-locale=en. If the parameter is already filled no population will occur. So if in the previous example page had a value already then it would be left unchanged.
Parameters:
uri - the URI to populate.
locale - the locale. The locale to use for locale specific parameter values. If a desktop state is present its locale will override this setting.
query - the query string of the status page request. This parameter is optional, it is valid to pass null.
state - the state of the desktop when the status page was requested.
Returns:
the populated URI. This method will never return null.
Throws:
IOException - an input/output error occurred reading the HTTP request body.

getRedirectionParameter

String getRedirectionParameter(String parameter,
                               Locale locale,
                               StatusPageRequest.StatusPage page,
                               DesktopState state)
Gets the value for the status page redirection URI parameter given.
Parameters:
parameter - the status page redirection URI parameter.
locale - the locale to use for the value.
page - the status page type.
state - the state of the desktop when the status page was requested.
Returns:
the parameter value. The parameter value is a name value pair separated by an equals sign. For example asking for the locate parameter could result in irm-locale=en. The value part of the name value pair is encoded in the application/x-www-form-urlencoded MIME format. Nothing will be returned if the value cannot be determined or if the parameter isn't recognized. This method can return null.

Skip navigation links

Oracle® Information Rights Management Server Java API Reference
11g Release 1 (11.1.1)

E12907-03


Copyright © 2011, Oracle. All rights reserved.