com.sun.identity.liberty.ws.disco
Class EncryptedResourceID

java.lang.Object
  |
  +--com.sun.identity.liberty.ws.disco.EncryptedResourceID

public class EncryptedResourceID
extends java.lang.Object

The class EncryptedResourceID represents an Encryption Resource ID element for the Discovery Service.

The following schema fragment specifies the expected content within the EncryptedResourceID object.

 <xs:element name="EncryptedResourceID" type="EncryptedResourceIDType"/>
 <complexType name="EncryptedResourceIDType">
   <complexContent>
     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
       <sequence>
         <element ref="{http://www.w3.org/2001/04/xmlenc#}EncryptedData"/>
         <element ref="{http://www.w3.org/2001/04/xmlenc#}EncryptedKey"/>
       </sequence>
     </restriction>
   </complexContent>
 </complexType>
 


Constructor Summary
EncryptedResourceID()
          Default constructor
EncryptedResourceID(org.w3c.dom.Element elem)
          Constructor.
EncryptedResourceID(org.w3c.dom.Element encryptedData, org.w3c.dom.Element encryptedKey)
          Constructor.
EncryptedResourceID(org.w3c.dom.Element elem, java.lang.String nspaceURI)
          Constructs a encrypted resource ID.
 
Method Summary
static ResourceID getDecryptedResourceID(EncryptedResourceID eri, java.lang.String providerID)
          Returns an instance of ResourceID object.
 org.w3c.dom.Element getEncryptedData()
          Gets encrypted data.
 org.w3c.dom.Element getEncryptedKey()
          Gets encrypted key element.
static EncryptedResourceID getEncryptedResourceID(ResourceID ri, java.lang.String providerID)
          Returns an EncryptedResourceID object.
 void setEncryptedData(org.w3c.dom.Element data)
          Sets encrypted data element.
 void setEncryptedKey(org.w3c.dom.Element key)
          Sets encrypted key element.
 java.lang.String toString()
          Returns string format.
 java.lang.String toString(java.lang.String ns)
          Returns string format.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EncryptedResourceID

public EncryptedResourceID()
Default constructor

EncryptedResourceID

public EncryptedResourceID(org.w3c.dom.Element elem)
                    throws DiscoveryException
Constructor.
Parameters:
elem - EncryptedResourceID DOM element
Throws:
DiscoveryException - if error occurs

EncryptedResourceID

public EncryptedResourceID(org.w3c.dom.Element elem,
                           java.lang.String nspaceURI)
                    throws DiscoveryException
Constructs a encrypted resource ID.
Parameters:
elem - EncryptedResourceID DOM element
nspaceURI - Name space URI for this element. By default, Discovery name space is used.
Throws:
DiscoveryException - if error occurs.

EncryptedResourceID

public EncryptedResourceID(org.w3c.dom.Element encryptedData,
                           org.w3c.dom.Element encryptedKey)
Constructor.
Parameters:
encryptedData - Encrypted data in DOM Element.
encryptedKey - Encrypted key in DOM Element.
Method Detail

setEncryptedData

public void setEncryptedData(org.w3c.dom.Element data)
Sets encrypted data element.
Parameters:
data - encrypted data element.

getEncryptedData

public org.w3c.dom.Element getEncryptedData()
Gets encrypted data.
Returns:
encrypted data.

getEncryptedKey

public org.w3c.dom.Element getEncryptedKey()
Gets encrypted key element.
Returns:
encrypted key element.

setEncryptedKey

public void setEncryptedKey(org.w3c.dom.Element key)
Sets encrypted key element.
Parameters:
key - encrypted key element.

getDecryptedResourceID

public static ResourceID getDecryptedResourceID(EncryptedResourceID eri,
                                                java.lang.String providerID)
                                         throws DiscoveryException
Returns an instance of ResourceID object. It takes an instance of EncryptedResourceID and decrypts the contents using the decryption key of the provider ID.
Parameters:
eri - EncryptedResourceID instance that needs to be decrypted.
providerID - The provider ID whose decryption key that needs to be used for decryption.
Throws:
DiscoveryException - if error occurs during the operation.

getEncryptedResourceID

public static EncryptedResourceID getEncryptedResourceID(ResourceID ri,
                                                         java.lang.String providerID)
                                                  throws DiscoveryException
Returns an EncryptedResourceID object. It takes a resource ID and provider ID, encrypts the resource ID based on the encryption key of the provider ID.
Parameters:
resourceID - The resource ID instance that needs to be encrypted.
providerID - The provider ID whose encryption key needs to be used for encryption.
Throws:
DiscoveryException - if error occurs during this operation.

toString

public java.lang.String toString()
Returns string format.
Overrides:
toString in class java.lang.Object
Returns:
formatted string.

toString

public java.lang.String toString(java.lang.String ns)
Returns string format.
Parameters:
ns - namespace value
Returns:
formatted string.


Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.