Skip navigation links

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

E12907-01


oracle.irm.j2ee.jws.core.storage
Interface DesktopServicesEndpoint


public interface DesktopServicesEndpoint

Web Service end point interface for Desktop Services. Provides services that a user would typically perform on a desktop. When operations occur on the desktop licenses, classifications and cryptography key details are shipped to the desktop and stored locally in a DesktopStore. The licenses control how long these details are cached and determine such things as whether these licenses are stored on disk. When operations such as sealing, resealing or unsealing are performed this cache is automatically accessed or updated. The synchronization operation allows all rights to be obtained and cached. The check in operation release the use of these details so they can be used on another location (a different desktop). The desktop services are thread safe and it is valid for multiple threads and multiple users to use the services concurrently.

The desktop services can be used from J2SE applications using local libraries (license details stored and used locally) as well as being used remotely by accessing the J2EE sealing server application using web services (license details user and stored on a server).

WSDL

The WSDL for this end point interface can be downloaded from the server using the following URL:

 http://irm.example.com/irm_sealing/desktop_services?wsdl
 

Endpoint URL

Requests for this web service should be sent to the following URL:

 https://irm.example.com/irm_sealing/desktop_services
 

Method Summary
 boolean checkForAvailableLicenses(Feature feature, Classification classification)
          Check that the authenticated account has a license.
 void checkIn(URI uri)
          Perform a check in for the specified server and update the store.
 Classification[] listClassifications(URI uri)
          Lists classifications.

 

Method Detail

checkIn

void checkIn(URI uri)
Perform a check in for the specified server and update the store.

Checking in licenses from the sealing server

The following code demonstrates how to check in licenses currently checked out to a sealing server. When the sealing server processes content it will usually check out licenses for the authenticated user. These licenses can no longer be used from other locations (e.g. the Oracle IRM desktop) until they expire or are manually checked in.
 import static oracle.irm.j2ee.jws.core.storage.DesktopServices.getDesktopServicesEndpoint;
 
 import java.net.Authenticator;
 import java.net.PasswordAuthentication;
 import java.net.URI;
 
 import oracle.irm.j2ee.jws.core.storage.DesktopServicesEndpoint;
 
 public class CheckInWS {
 
     public static void main(String[] args) {
 
         final String hostPort = args[0];
         final String username = args[1];
         final String password = args[2];
         
         // Configure an authenticator to provide the credentials
         // for the web service
         Authenticator.setDefault(new Authenticator() {
             @Override
             protected PasswordAuthentication getPasswordAuthentication() {
                 return new PasswordAuthentication(username, password.toCharArray());
             }
         });
         
         // Get the desktop services web service
         DesktopServicesEndpoint desktopServices = getDesktopServicesEndpoint(hostPort);
 
         // The server URI. e.g. https://irm.example.com/irm_desktop
         URI serverURI = URI.create(args[3]);
 
         // Check in all the licenses currently within the
         // desktop store for the given server
         desktopServices.checkIn(serverURI);
     }
Parameters:
uri - the server URI.

checkForAvailableLicenses

boolean checkForAvailableLicenses(Feature feature,
                                  Classification classification)
                                  throws UnknownClassificationFault,
                                         LicenseInUseFault,
                                         LicenseUnavailableFault
Check that the authenticated account has a license. This method checks that there is at least one license available for the authenticated account to perform the feature on the provided classification. If no licenses are available locally, licenses will be requested from the IRM server.
Parameters:
feature - the application feature being requested.
classification - the classification being used.
Returns:
whether there is a license that is available that allows the specified feature to be used against the provided classification.
Throws:
UnknownClassificationFault - the classification provided is known, but the exact instance of classification is unknown.
LicenseInUseFault - a license exists, but is in use on another device.
LicenseUnavailableFault - a license exists, but cannot be used for the specified feature and classification.

listClassifications

Classification[] listClassifications(URI uri)
Lists classifications. This method returns the classification information that the authenticated user is allowed to use (e.g. filtered for the user based on their rights to open, seal, etc). To do this the server must synchronize licenses, so be aware than a check in may be required to release licenses for use on other devices.

Whether classification details are provided by this method is an implementation detail of the classification system. It may not be feasible for certain classification systems to list all classification details. e.g. for the Context classification system this method should list all the contexts that the user has been assigned rights.

Classification details are required when performing a sealing or resealing operation. Some of the information in the classification may not be known by the caller, so this method can be used to provide this additional classification information.

List classifications

The following code demonstrates how to list classification details from a sealing server using the listClassifications method. The sample code displays the list of Classifications details available to the authenticated user.
 import static oracle.irm.j2ee.jws.core.storage.DesktopServices.getDesktopServicesEndpoint;
 
 import java.net.Authenticator;
 import java.net.PasswordAuthentication;
 import java.net.URI;
 
 import oracle.irm.engine.types.core.classification.Classification;
 import oracle.irm.engine.types.core.general.Label;
 import oracle.irm.j2ee.jws.core.storage.DesktopServicesEndpoint;
 
 public class ListClassificationsWS {
 
     public static void main(String[] args) throws Exception {
 
         final String hostPort = args[0];
         final String username = args[1];
         final String password = args[2];
         
         // Configure an authenticator to provide the credentials
         // for the web service
         Authenticator.setDefault(new Authenticator() {
             @Override
             protected PasswordAuthentication getPasswordAuthentication() {
                 return new PasswordAuthentication(username, password.toCharArray());
             }
         });
 
         // The server URI. e.g. https://irm.example.com/irm_desktop
         URI serverURI = URI.create(args[3]);
 
         // Get the desktop services web service
         DesktopServicesEndpoint desktopServices = getDesktopServicesEndpoint(hostPort);
 
         // Synchronize with the specified server
         Classification[] classifications = desktopServices.listClassifications(serverURI);
 
         // Display the labels of the classifications
         for (Classification classification : classifications) {
 
             for (Label label : classification.getLabels()) {
                 System.out.println(label.getLocale().getDisplayName() + " : " + label.getName());
             }
         }
     }
 }
Parameters:
uri - the server URI.
Returns:
the classifications accessible to the authenticated user.

Skip navigation links

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

E12907-01


Copyright © 2010, Oracle. All rights reserved.