com.filenet.wcm.toolkit.server.util.xml
Class WcmXMLSecurityPolicy

java.lang.Object
  extended bycom.filenet.wcm.toolkit.server.util.xml.WcmDocumentImpl
      extended bycom.filenet.wcm.toolkit.server.util.xml.WcmXMLObject
          extended bycom.filenet.wcm.toolkit.server.util.xml.WcmXMLProperties
              extended bycom.filenet.wcm.toolkit.server.util.xml.WcmXMLSecurityPolicy

public class WcmXMLSecurityPolicy
extends WcmXMLProperties

WcmXMLProperties derived class for manipulating Security Policy specific XML


Field Summary
static java.lang.String APPLY_STATE_ID_IN_PROCESS
          Apply State Id for an in Process Document
static java.lang.String APPLY_STATE_ID_RELEASED
          Apply State Id for a Released Document
static java.lang.String APPLY_STATE_ID_RESERVATION
          Apply State Id for a Reservation Document
static java.lang.String APPLY_STATE_ID_SUPERSEDED
          Apply State Id for a Superseded Document
static java.lang.String ELEM_SECURITY_TEMPLATE
          XPath for a security template node
static java.lang.String ELEM_SECURITY_TEMPLATES
          XPath for the security templates node
static int VERSION_STATUS_IN_PROCESS
          Value of 1; document version is in a in-process status.
static int VERSION_STATUS_RELEASED
          Value of 0; document version is in a released status.
static int VERSION_STATUS_RESERVATION
          Value of 2; document version is in a reservation status.
static int VERSION_STATUS_SUPERSEDED
          Value of 3; document version is in a superseded status.
 
Fields inherited from class com.filenet.wcm.toolkit.server.util.xml.WcmXMLProperties
ELEM_PROPERTY
 
Fields inherited from class com.filenet.wcm.toolkit.server.util.xml.WcmXMLObject
ELEM_CLASSID, ELEM_CLASSNAME, ELEM_OBJECT, ELEM_OBJECTSTORE
 
Fields inherited from class com.filenet.wcm.toolkit.server.util.xml.WcmDocumentImpl
ELEM_OBJECTSET, thisDoc
 
Constructor Summary
WcmXMLSecurityPolicy(org.w3c.dom.Document newXMLSecurityPolicy)
          Constructor takes the Document object to implement
 
Method Summary
 void cancelTemplate()
          Remove the buffer template, restore original
 org.w3c.dom.Element createSecurityPolicyElement()
          Create the customobject Element
 org.w3c.dom.Element createTemplatesElement()
          Creates a templates element and returns it
 void defineTemplate(java.lang.String applyStateId, java.lang.String name, boolean enabled)
          Defines the template with the given values
 org.w3c.dom.NodeList getPermissionsNodeList(java.lang.String applyStateId)
          Get the permissions NodeList
 java.lang.String getPolicyPreservedDirectPermissions()
          Returns the preserved direct permissions value
 org.w3c.dom.Element getSecurityPolicy()
          Returns the customobject Element or creates a new one
 java.lang.String[] getTemplateApplyStateIds()
          Returns a String array of applyStateIds
 boolean getTemplateIsEnabled(java.lang.String applyStateId)
          Indicates if this template is enabled
 java.lang.String getTemplateName(java.lang.String applyStateId)
          Get the template Name with the given applyStateId
 org.w3c.dom.Element getTemplatePermissions()
          Writeable get templates permissions
 org.w3c.dom.Element getTemplatePermissions(java.lang.String applyStateId)
          Read only get templates permissions - Do NOT Modify
 org.w3c.dom.Element getTemplatesElement()
          Get the Templates element
static WcmXMLSecurityPolicy getXMLSecurityPolicy()
          get method returns a new instance of this Security Policy
static WcmXMLSecurityPolicy getXMLSecurityPolicy(org.w3c.dom.Document newXMLSecurityPolicy)
          get method creates or contains the Security Policy as one of this type
 boolean hasTemplatesNode()
          Indicates if this Security Policy has a templates node
 boolean isApplicationTemplate(java.lang.String applyStateId)
          Indicates if the given applyStateId is for an Application Template
 void mergeTemplates(org.w3c.dom.Document templates)
          Merges the given templates Document into this Security Policy
 void removeTemplate(java.lang.String applyStateId)
          Remove the indicated template
 void saveTemplate(java.lang.String applyStateId)
          Save buffer as a new template, replacing original if found
 void setTemplate(java.lang.String applyStateId)
          Sets a Buffer template with the give applyStateId
 void setTemplate(java.lang.String applyStateId, java.lang.String name)
          Sets a Buffer template with the give applyStateId and name
 int templateCount()
          Returns the number of templates found
 boolean validateTemplate(java.lang.String applyStateId, java.util.Locale locale)
          Validates the template with the given applyStateId
 
Methods inherited from class com.filenet.wcm.toolkit.server.util.xml.WcmXMLProperties
addMultiObjectValues, addMultiValues, addMultiValues, createComponentRelationshipElement, createCustomObjectElement, createDocumentElement, createFolderElement, createLinkElement, createPropertiesElement, createPropertyElement, createPropertyElement, createPropertyElement, createPropertyElement, getComponentRelationship, getCustomObject, getDocument, getFolder, getLink, getPropertiesElement, getPropertyByID, getPropertyByID, getPropertyByName, getPropertyByName, getPropertySymnameById, getPropertyValueByID, getPropertyValueByName, getPropertyValueByName, getPropertyValueIdByName, getXMLProperties, getXMLProperties, removeAllPropValues, removeObjectValuesByName, removeProperties, removePropertyByName, removePropValues, removeValuesByName, removeValuesByName, setObjectElement, setObjectElement, setPropertyByID, setPropertyByName, setPropertyByName, setPropertyElement
 
Methods inherited from class com.filenet.wcm.toolkit.server.util.xml.WcmXMLObject
getClassdescElement, getClassId, getClassName, getObjectElement, getObjectId, getObjectStoreElement, getObjectStoreId, getObjectTagValue, getObjectXPath, getXMLObject, getXMLObject, setClassDescription, setObjectStoreId, setObjectTagValue, setObjectXPath
 
Methods inherited from class com.filenet.wcm.toolkit.server.util.xml.WcmDocumentImpl
createCDATAChildElement, createChildElement, createChildElement, createNamespace, getDocumentImpl, getElement, getElement, getElementText, getNodeList, getThis
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION_STATUS_RELEASED

public static final int VERSION_STATUS_RELEASED
Value of 0; document version is in a released status.

See Also:
Constant Field Values

VERSION_STATUS_IN_PROCESS

public static final int VERSION_STATUS_IN_PROCESS
Value of 1; document version is in a in-process status.

See Also:
Constant Field Values

VERSION_STATUS_RESERVATION

public static final int VERSION_STATUS_RESERVATION
Value of 2; document version is in a reservation status.

See Also:
Constant Field Values

VERSION_STATUS_SUPERSEDED

public static final int VERSION_STATUS_SUPERSEDED
Value of 3; document version is in a superseded status.

See Also:
Constant Field Values

APPLY_STATE_ID_RESERVATION

public static final java.lang.String APPLY_STATE_ID_RESERVATION
Apply State Id for a Reservation Document

See Also:
Constant Field Values

APPLY_STATE_ID_IN_PROCESS

public static final java.lang.String APPLY_STATE_ID_IN_PROCESS
Apply State Id for an in Process Document

See Also:
Constant Field Values

APPLY_STATE_ID_RELEASED

public static final java.lang.String APPLY_STATE_ID_RELEASED
Apply State Id for a Released Document

See Also:
Constant Field Values

APPLY_STATE_ID_SUPERSEDED

public static final java.lang.String APPLY_STATE_ID_SUPERSEDED
Apply State Id for a Superseded Document

See Also:
Constant Field Values

ELEM_SECURITY_TEMPLATES

public static final java.lang.String ELEM_SECURITY_TEMPLATES
XPath for the security templates node

See Also:
Constant Field Values

ELEM_SECURITY_TEMPLATE

public static final java.lang.String ELEM_SECURITY_TEMPLATE
XPath for a security template node

See Also:
Constant Field Values
Constructor Detail

WcmXMLSecurityPolicy

public WcmXMLSecurityPolicy(org.w3c.dom.Document newXMLSecurityPolicy)
Constructor takes the Document object to implement

Parameters:
newXMLSecurityPolicy - The new Document object
Method Detail

getXMLSecurityPolicy

public static WcmXMLSecurityPolicy getXMLSecurityPolicy()
get method returns a new instance of this Security Policy

Returns:
WcmXMLSecurityPolicy The new WcmXMLSecurityPolicy object

getXMLSecurityPolicy

public static WcmXMLSecurityPolicy getXMLSecurityPolicy(org.w3c.dom.Document newXMLSecurityPolicy)
get method creates or contains the Security Policy as one of this type

Parameters:
newXMLSecurityPolicy - The Document to contain
Returns:
WcmXMLSecurityPolicy The new WcmXMLSecurityPolicy object

getSecurityPolicy

public org.w3c.dom.Element getSecurityPolicy()
                                      throws java.lang.Exception
Returns the customobject Element or creates a new one

Returns:
The customobject Element
Throws:
java.lang.Exception

createSecurityPolicyElement

public org.w3c.dom.Element createSecurityPolicyElement()
                                                throws java.lang.Exception
Create the customobject Element

Returns:
The new customobject Element
Throws:
java.lang.Exception

hasTemplatesNode

public boolean hasTemplatesNode()
                         throws java.lang.Exception
Indicates if this Security Policy has a templates node

Returns:
true or false if there is a template node
Throws:
java.lang.Exception

templateCount

public int templateCount()
                  throws java.lang.Exception
Returns the number of templates found

Returns:
The number of templates found
Throws:
java.lang.Exception

getTemplatesElement

public org.w3c.dom.Element getTemplatesElement()
                                        throws java.lang.Exception
Get the Templates element

Returns:
The templates element
Throws:
java.lang.Exception

createTemplatesElement

public org.w3c.dom.Element createTemplatesElement()
                                           throws java.lang.Exception
Creates a templates element and returns it

Returns:
The new templates element
Throws:
java.lang.Exception

mergeTemplates

public void mergeTemplates(org.w3c.dom.Document templates)
                    throws java.lang.Exception
Merges the given templates Document into this Security Policy

Parameters:
templates - The templates to merge
Throws:
java.lang.Exception

getTemplatePermissions

public org.w3c.dom.Element getTemplatePermissions()
                                           throws java.lang.Exception
Writeable get templates permissions

Returns:
permission buffer
Throws:
java.lang.Exception

getTemplatePermissions

public org.w3c.dom.Element getTemplatePermissions(java.lang.String applyStateId)
                                           throws java.lang.Exception
Read only get templates permissions - Do NOT Modify

Parameters:
applyStateId -
Returns:
actual template permissions
Throws:
java.lang.Exception

getPermissionsNodeList

public org.w3c.dom.NodeList getPermissionsNodeList(java.lang.String applyStateId)
                                            throws java.lang.Exception
Get the permissions NodeList

Parameters:
applyStateId - Desired Template's applyStateId
Returns:
The Permissions NodeList
Throws:
java.lang.Exception

getTemplateName

public java.lang.String getTemplateName(java.lang.String applyStateId)
                                 throws java.lang.Exception
Get the template Name with the given applyStateId

Parameters:
applyStateId - The template's applyStateId
Returns:
The Template Name
Throws:
java.lang.Exception

getTemplateIsEnabled

public boolean getTemplateIsEnabled(java.lang.String applyStateId)
                             throws java.lang.Exception
Indicates if this template is enabled

Parameters:
applyStateId - Desired Template applyStateId
Returns:
is this template enabled?
Throws:
java.lang.Exception

getPolicyPreservedDirectPermissions

public java.lang.String getPolicyPreservedDirectPermissions()
                                                     throws java.lang.Exception
Returns the preserved direct permissions value

Returns:
String The value of the preserved direct permissions property.
Throws:
java.lang.Exception

getTemplateApplyStateIds

public java.lang.String[] getTemplateApplyStateIds()
                                            throws java.lang.Exception
Returns a String array of applyStateIds

Returns:
String array of applyStateIds
Throws:
java.lang.Exception

isApplicationTemplate

public boolean isApplicationTemplate(java.lang.String applyStateId)
                              throws java.lang.Exception
Indicates if the given applyStateId is for an Application Template

Parameters:
applyStateId - template to check
Returns:
true if this is an Application Template
Throws:
java.lang.Exception

defineTemplate

public void defineTemplate(java.lang.String applyStateId,
                           java.lang.String name,
                           boolean enabled)
                    throws java.lang.Exception
Defines the template with the given values

Parameters:
applyStateId - desired applyStateId
name - Name for the template
enabled - Is this template enabled
Throws:
java.lang.Exception

validateTemplate

public boolean validateTemplate(java.lang.String applyStateId,
                                java.util.Locale locale)
                         throws java.lang.Exception
Validates the template with the given applyStateId

Parameters:
applyStateId - Identifies the template to validate
Returns:
true if the template is valid
Throws:
java.lang.Exception

cancelTemplate

public void cancelTemplate()
                    throws java.lang.Exception
Remove the buffer template, restore original

Throws:
java.lang.Exception

setTemplate

public void setTemplate(java.lang.String applyStateId,
                        java.lang.String name)
                 throws java.lang.Exception
Sets a Buffer template with the give applyStateId and name

Parameters:
applyStateId -
name -
Throws:
java.lang.Exception

setTemplate

public void setTemplate(java.lang.String applyStateId)
                 throws java.lang.Exception
Sets a Buffer template with the give applyStateId

Parameters:
applyStateId -
Throws:
java.lang.Exception

saveTemplate

public void saveTemplate(java.lang.String applyStateId)
                  throws java.lang.Exception
Save buffer as a new template, replacing original if found

Parameters:
applyStateId - identifies the template
Throws:
java.lang.Exception

removeTemplate

public void removeTemplate(java.lang.String applyStateId)
                    throws java.lang.Exception
Remove the indicated template

Parameters:
applyStateId - Identifies the desired template
Throws:
java.lang.Exception


© Copyright IBM Corp. 2002, 2007. All Rights Reserved.