|
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 |
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).
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
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 |
---|
void checkIn(URI uri)
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); }
uri
- the server URI.boolean checkForAvailableLicenses(Feature feature, Classification classification) throws UnknownClassificationFault, LicenseInUseFault, LicenseUnavailableFault
feature
- the application feature being requested.classification
- the classification being used.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.Classification[] listClassifications(URI uri)
Context
classification system this method should list all the contexts that the user has been assigned rights.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()); } } } }
uri
- the server URI.
|
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 |