com.plumtree.remote.sci
Class SciPasswordElement

java.lang.Object
  extended bycom.plumtree.remote.sci.SciPasswordElement
All Implemented Interfaces:
ISciElement

public class SciPasswordElement
extends java.lang.Object
implements ISciElement

Represents a password control with confirmation box. If a developer does not want to store the unencrypted value, use the IAdminEditor.finalize() as follows:
1. Check if the password value is not blank and is not equal to *******, or whatever value has been set in setValue.
2. If the password passes the above test and there is not already an existing encrypted password, encrypt the password, and add it to the NamedValueMap with your key for the encrypted password.
3. If the password passes the above test and there is already an existing encrypted password, decrypt the encrypted password and compare it to the new password. If the new password is different, encrypt it and add it to the NamedValueMap with your key for the encrypted password.
4. Remove the password from the NamedValueMap so it is not stored unencrypted.


Constructor Summary
SciPasswordElement(java.lang.String fieldName, java.lang.String labelText, java.lang.String verifyText, java.lang.String matchText)
          Valued constructor.
 
Method Summary
 org.w3c.dom.Node getRootNode()
          Gets the Node root node to add to the page.
 void setSize(int size)
          Sets the size of the control in characters.
 void setValue(java.lang.String value)
          Sets the displayed password value, usually ********.
 java.lang.String toString()
          Writes the elements to a string for debugging.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SciPasswordElement

public SciPasswordElement(java.lang.String fieldName,
                          java.lang.String labelText,
                          java.lang.String verifyText,
                          java.lang.String matchText)
Valued constructor.

Note: Values retrieved from the portal using IDocFetchProvider.initialize(DataSourceInfo dsInfo) will be decoded in the process. To prevent "+" from being decoded into a space and "%" from having indeterminate behavior, make sure that all values entered into the data source using SCI pages are encoded using com.plumtree.remote.util.CSPCodec. Likewise, all values that have been encoded in the SCI data source pages should be decoded when displayed with SCI using com.plumtree.remote.util.CSPCodec. If the developer is not using DocFetch this is not an issue.

Parameters:
fieldName - the name of the field; should be uppercase as the portal will uppercase all names in the NamedValue[] returned by IAdminEditor.finalize()
labelText - the text to display to the left of the control
verifyText - the text to display to the left of the second password box for confirmation, usually "Confirm"
matchText - the message to display in the Javascript alert if passwords do not match
See Also:
CSPCodec
Method Detail

setSize

public void setSize(int size)
Sets the size of the control in characters. The size must be between 1 and 64.

Parameters:
size - the size of the control

setValue

public void setValue(java.lang.String value)
Sets the displayed password value, usually ********.

Parameters:
value - the displayed password value

getRootNode

public org.w3c.dom.Node getRootNode()
Gets the Node root node to add to the page.

Specified by:
getRootNode in interface ISciElement
Returns:
the root node

toString

public java.lang.String toString()
Writes the elements to a string for debugging.

Returns:
the element as a string


For additional information on the Oracle® WebCenter Interaction Development Kit, including tutorials, blogs, code samples and more, see the Oracle Technology Network (http://www.oracle.com/technology/index.html).

Copyright ©2010 Oracle® Corporation. All Rights Reserved.