Oracle BPEL Process Manager
Client API Reference
10g Release 2 (10.1.2)
B25709-01


com.oracle.bpel.security
Class BPELPrincipal

java.lang.Object
  extended bycom.oracle.bpel.security.BPELPrincipal

All Implemented Interfaces:
java.security.Principal

public class BPELPrincipal
extends java.lang.Object
implements java.security.Principal

BPEL Specific Principal Implementation including credential hashing to md5

Version:
1.6
Author:
Clemens Utschig-Utschig (Oracle Corporation)

Field Summary
static java.lang.String XML_BPEL_CALLER
          static constant for XML
static java.lang.String XML_BPEL_CREDENTIAL
          static constant for XML
static java.lang.String XML_BPEL_SECURITY
          static constant for XML
static java.lang.String XML_BPEL_USER
          static constant for XML

 

Constructor Summary
BPELPrincipal(java.lang.String pFromToString)
          Internal Constructor for the framework Developers should NOT use this constructor!!!
BPELPrincipal(java.lang.String pName, java.lang.String pPlainTextOrEncrypted)
          public small Constructor
BPELPrincipal(java.lang.String pName, java.lang.String pPlainTextOrEncrypted, java.net.InetAddress pInetAddress)
          public extended constructor

 

Method Summary
 java.net.InetAddress getCallerAddress()
          Returns the IP-address of the caller (in case it has been null on the client side it's the address where the client API is running)
 java.lang.String getCredential()
          Returns the password
 java.lang.String getName()
          Returns the name of the Principal
 void hashCredentialToMD5()
          Helper Method for Encrpytion with MD5-Algorithm
 void setCallerAddress(java.net.InetAddress pAddress)
          Set the InetAddress of the caller
 void setCredential(java.lang.String pPlainText)
          Set the password for this specific credential
 java.lang.String toString()
          ToString of this object
 org.w3c.dom.Element toXML()
          To enable easier conversion into xml.

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Methods inherited from interface java.security.Principal
equals, hashCode

 

Field Detail

XML_BPEL_SECURITY

public static final java.lang.String XML_BPEL_SECURITY
static constant for XML
See Also:
Constant Field Values

XML_BPEL_CREDENTIAL

public static final java.lang.String XML_BPEL_CREDENTIAL
static constant for XML
See Also:
Constant Field Values

XML_BPEL_USER

public static final java.lang.String XML_BPEL_USER
static constant for XML
See Also:
Constant Field Values

XML_BPEL_CALLER

public static final java.lang.String XML_BPEL_CALLER
static constant for XML
See Also:
Constant Field Values

Constructor Detail

BPELPrincipal

public BPELPrincipal(java.lang.String pName,
                     java.lang.String pPlainTextOrEncrypted)
public small Constructor
Parameters:
pName - Name of the principal
pPlainTextOrEncrypted - the plaintext password

BPELPrincipal

public BPELPrincipal(java.lang.String pName,
                     java.lang.String pPlainTextOrEncrypted,
                     java.net.InetAddress pInetAddress)
public extended constructor
Parameters:
pInetAddress - the inetAddress of the caller, if null the one where the API is executed on
pName - Name of the principal
pPlainTextOrEncrypted - the plaintext password

BPELPrincipal

public BPELPrincipal(java.lang.String pFromToString)
              throws java.lang.IllegalArgumentException
Internal Constructor for the framework Developers should NOT use this constructor!!!
Parameters:
pFromToString - the concatination for soap
Throws:
java.lang.IllegalArgumentException

Method Detail

setCredential

public void setCredential(java.lang.String pPlainText)
                   throws java.security.NoSuchAlgorithmException,
                          java.io.UnsupportedEncodingException
Set the password for this specific credential
Parameters:
pPlainText - the plaintextpassword
Throws:
java.io.UnsupportedEncodingException
java.security.NoSuchAlgorithmException

getCredential

public java.lang.String getCredential()
Returns the password
Returns:
the hashed password - we don't want to play with plaintext

getName

public java.lang.String getName()
Returns the name of the Principal
Specified by:
getName in interface java.security.Principal
Returns:
the name

setCallerAddress

public void setCallerAddress(java.net.InetAddress pAddress)
Set the InetAddress of the caller
Parameters:
pAddress - the address

getCallerAddress

public java.net.InetAddress getCallerAddress()
Returns the IP-address of the caller (in case it has been null on the client side it's the address where the client API is running)
Returns:
the address, and hostname

hashCredentialToMD5

public final void hashCredentialToMD5()
                               throws java.security.NoSuchAlgorithmException,
                                      java.io.UnsupportedEncodingException
Helper Method for Encrpytion with MD5-Algorithm
Throws:
java.security.NoSuchAlgorithmException - if the requested algorithm was not found
java.io.UnsupportedEncodingException - if the requested encoding (UTF-8) is not supported

toString

public java.lang.String toString()
ToString of this object
Specified by:
toString in interface java.security.Principal
Returns:
<name>|-|<credential>|-|<inetAddress>

toXML

public org.w3c.dom.Element toXML()
                          throws org.w3c.dom.DOMException
To enable easier conversion into xml.
Returns:
the information needed for serialization into SOAP Header
Throws:
org.w3c.dom.DOMException
Since:
1.6

Oracle BPEL Process Manager
Client API Reference
10g Release 2 (10.1.2)
B25709-01


Copyright © 2005, Oracle. All rights reserved.