|
Oracle® Information Rights Management Server Java API Reference 11g Release 1 (11.1.1) E12907-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.irm.engine.core.status.StatusPageOperationsInstance
public final class StatusPageOperationsInstance
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.
This class provides static methods for a set of procedural style methods. The methods can be made to appear as global methods by using import static. e.g.
import static oracle.irm.engine.core.status.StatusPageOperationsInstance.*;
Method Summary | |
---|---|
static DesktopState |
extractStateFromBody(InputStream stream) Extract the classification from a HTTP body. |
static String |
getRedirectionParameter(String parameter, Locale locale, StatusPageRequest.StatusPage page, DesktopState state) Gets the value for the status page redirection URI parameter given. |
static Label |
getStatusLabel(Locale locale, StatusPageRequest.StatusPage page, DesktopState state) Get a caption and description for a status page. |
static ContentType |
getStatusPageContentType(DesktopState state) Gets the appropriate content type from the desktop state. |
static StatusPageRequest.StatusPage |
getStatusPageFromQuery(String query) Extract the status page from a query. |
static StatusPageInformation |
getStatusPageInformation(Locale locale, StatusPageRequest.StatusPage page, DesktopState state) Obtain status page information. |
static Collection<HyperLink> |
getStatusPageLinks(Locale locale, StatusPageRequest.StatusPage page, DesktopState state) Get status page links. |
static StatusPageResponse |
getStatusPageResponse(String query, DesktopState state) Obtain a status page response. |
static URI |
getStatusPageURI(URI uri, StatusPageRequest.StatusPage page) Get the full URI for a status page. |
static void |
insertStateIntoBody(DesktopState state, OutputStream stream) Create the response body for a status page. |
static URI |
populateRedirectionURI(URI uri, Locale locale, String query, DesktopState state) Populates a status page redirection URI with all of the requested parameters. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static URI getStatusPageURI(URI uri, StatusPageRequest.StatusPage page)
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.insertStateIntoBody
method can be used to transform a DesktopState
into XML and stream it into an output stream.uri
- the information URI.page
- the status page.getStatusPageFromQuery
public static StatusPageRequest.StatusPage getStatusPageFromQuery(String query)
extractStateFromBody
.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.getStatusPageURI
public static void insertStateIntoBody(DesktopState state, OutputStream stream) throws IOException
DesktopState
. This method can be used to stream the DesktopState
into a HTTP response output stream.state
- the desktop state.stream
- the output stream.IOException
- output stream exception.extractStateFromBody
public static DesktopState extractStateFromBody(InputStream stream) throws IOException
DesktopState
sent from the client.stream
- the input stream.IOException
- there was a problem reading the state from the input stream.insertStateIntoBody
public static Label getStatusLabel(Locale locale, StatusPageRequest.StatusPage page, DesktopState state)
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.public static Collection<HyperLink> getStatusPageLinks(Locale locale, StatusPageRequest.StatusPage page, DesktopState state)
StatusPageInformation
instance.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.public static StatusPageInformation getStatusPageInformation(Locale locale, StatusPageRequest.StatusPage page, DesktopState state) throws StatusPageRedirectException
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.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.StatusPageRedirectException
- if the status page is provided by an external web page.public static ContentType getStatusPageContentType(DesktopState state)
state
- the desktop state.public static StatusPageResponse getStatusPageResponse(String query, DesktopState state) throws StatusPageRedirectException, IOException
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.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.StatusPageRedirectException
- if the status page is provided by an external web page.IOException
- in an input/output error occurred reading the HTTP request body.public static URI populateRedirectionURI(URI uri, Locale locale, String query, DesktopState state) throws IOException
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.IOException
- an input/output error occurred reading the HTTP request body.public static String getRedirectionParameter(String parameter, Locale locale, StatusPageRequest.StatusPage page, DesktopState state)
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.
|
Oracle® Information Rights Management Server Java API Reference 11g Release 1 (11.1.1) E12907-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |