Package com.ptc.core.ui.validation
Class UIValidationCriteria
java.lang.Object
com.ptc.core.ui.validation.UIValidationCriteria
- All Implemented Interfaces:
FormDataHolder,Serializable
UIValidationCriteria objects serve as wrappers for data to be passed to the APIs on the UIComponentValidationService.
A client of the UIComponentValidationService would instantiate a UIValidationCriteria object, and populate as many
attributes in that object as it is aware of.
The validators called by the UIComponentValidationService will use the attributes specified in a UIValidationCriteria
object to perform validation operations.
Implementations of the UIComponentValidator Interface should make it clear which attributes of a UIValidationCriteria
they are expecting to have populated. That way, if a caller of the validation service knows which validator(s) will
be performing their validation, they can populate the UIValidationCriteria appropriately.
In many cases, the Validation service will call a series of Validators. If one Validator has to calculate one or more
attributes of the UIValidationCriteria, and that attribute may be useful for other Validators, the initial Validator
may add/update the values of the UIValidationCriteria, and those updated values will be available to subsequent
Validators. In the unlikely case that a Validator wants to ensure that the data they get has not been provided by
another Validator, they can call the getClientCriteria method to get the original, unchanged, UIValidationCriteria
specified by a client.
Supported API: true
Extendable: false
Supported API: true
Extendable: false
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddNmCommandBean(NmCommandBean commandBean) This is a helper method that allows a caller of the validation service to add all of the content of the NmCommandBean to the UIValidationCriteria.wt.access.AccessPermissionSetReturns cached access control permissions for a given persistable if already cached, or retrieves the AccessPermissionSet for the object and caches it.getAddedItemsByName(String param_name)
Supported API: trueThis method returns the equivalent of calling NmCommandBean.getRequestData().getCgiData()
Supported API: trueGets the comboboxes that have changed.Returns a Map of any radio buttons that have changed.Gets the textboxes that have changed.Gets the TextAreas that have changed.Gets the value of the attribute: checked; The CheckBoxes that are checked on this posted request object
Supported API: truecom.ptc.core.ui.resources.ClientTypeGets the value of the attribute: clientType.
Supported API: trueGets the value of the attribute: comboBox; The ComboBoxes that are posted on this request object
Supported API: trueGets the value of the attribute: compContext.Gets the value of the attribute: componentContext.Gets the value of the attribute: componentMode.Gets the value of the attribute: componentType.Gets the value of the attribute: contextObject; The contextObject WTReference can be used to indcate which object should be used to perfrom validation.Gets the value of the attribute: contextObject_nonPersistable; The contextObject WTReference can be used to indcate which object should be used to perfrom validation.Gets the value of the attribute: formData; The formData attribute can be used to pass a Map of form data (e.g., from a form being submitted) to the validation service.getInitialItemsByName(String param_name) Returns the list of initial NmOids for objects which are associated to the component with the nameparam_name.Gets the value of the attribute: inWorkspace; The inWorkspace attribute can be used to specify whether or not the validation is being performed for an action or component in a Windchill workspace.
Supported API: true
Supported API: trueGets the value of the attribute: parentContainer; The parentContainer attribute can be used to indcate which container should be used to perfrom validation.Gets the value of the attribute: parentOrg; The parentOrg attribute can be used to indcate which organization should be used to perfrom validation.getRadio()
Supported API: truegetRemovedItemsByName(String param_name)
Supported API: trueThis method returns the equivalent of calling NmCommandBean.getRequestData().getParameterMap()
Supported API: true
Supported API: true
Supported API: true
Supported API: trueGets the value of the attribute: selectedRowObject; The selectedRowObject WTReference is used to represent the row object in a table where a table row (icon) action is selected.Gets the value of the attribute: selectedRowObjectID; The selectedRowObjectID String is used to represent the non-persistable row object in a table where a table row (icon) action is selected.Gets the value of the attribute: targetObjects; The targetObjects WTCollection can be used to indcate which object(s) should be used to perfrom validation.getText()Gets the value of the attribute: text; You can stick any data you want into this map to communicate them to the server side.* Gets the value of the attribute: textArea; The text areas that are posted on this request object
Supported API: truegetTextParameter(String key) Returns the value of the form data element specified by the key argument.String[]Returns the values of the form data element specified by the key argument.
Supported API: truegetUser()Gets the value of the attribute: user; The user attribute can be used to indcate which user should be used to perfrom validation.Gets the value of the attribute: userAgent from the request data.static UIValidationCriteriaCreates a new (empty) instance of a UIValidationCriteria objectstatic UIValidationCriterianewInstance(NmCommandBean commandBean) Creates a new instance of A UIValidationCriteria object whose properties are initialized by the NmCommandBean argument *
Supported API: true
-
Method Details
-
newInstance
Creates a new (empty) instance of a UIValidationCriteria object- Returns:
- an empty UIValidationCriteria object
Supported API: true
-
newInstance
Creates a new instance of A UIValidationCriteria object whose properties are initialized by the NmCommandBean argument *
Supported API: true- Parameters:
commandBean- an NmCommandBean used to initialize the UIValidationCriteria's properties- Returns:
- a UIValidationCriteria object, intialized using the commandBean argument
-
addNmCommandBean
This is a helper method that allows a caller of the validation service to add all of the content of the NmCommandBean to the UIValidationCriteria. There is no getter for the NmCommandBean, since we do not want the Validators to have dependencies on the Netmarkets infrastructure. Validators should access the content of the NmCommandBean via the getters for the individual fields defined in the UIValidationCriteria.
Supported API: true- Parameters:
commandBean-
-
getAccessPermissionSet
public wt.access.AccessPermissionSet getAccessPermissionSet(AccessControlled acObj) throws WTException Returns cached access control permissions for a given persistable if already cached, or retrieves the AccessPermissionSet for the object and caches it. *
Supported API: true- Parameters:
acObj-- Returns:
- AccessPermissionSet
- Throws:
WTException
-
getAddedItemsByName
Supported API: true- Specified by:
getAddedItemsByNamein interfaceFormDataHolder- Parameters:
param_name-- Returns:
- List
-
getChangedComboBox
Gets the comboboxes that have changed. Name -> new value
Supported API: true- Specified by:
getChangedComboBoxin interfaceFormDataHolder- Returns:
- Map
-
getChangedRadio
Returns a Map of any radio buttons that have changed. Radio buttons needed to have been rendered by gui-comopnents.
Supported API: true- Specified by:
getChangedRadioin interfaceFormDataHolder- Returns:
- Map
-
getChangedText
Gets the textboxes that have changed. Name -> new value
Supported API: true- Specified by:
getChangedTextin interfaceFormDataHolder- Returns:
- Map
-
getChangedTextArea
Gets the TextAreas that have changed. Name -> new value
Supported API: true- Specified by:
getChangedTextAreain interfaceFormDataHolder- Returns:
- Map
-
getChecked
Gets the value of the attribute: checked; The CheckBoxes that are checked on this posted request object
Supported API: true- Specified by:
getCheckedin interfaceFormDataHolder- Returns:
- Map
-
getClientType
public com.ptc.core.ui.resources.ClientType getClientType()Gets the value of the attribute: clientType.
Supported API: true- Returns:
- ClientType
-
getClipped
Supported API: true- Returns:
- List
-
getComboBox
Gets the value of the attribute: comboBox; The ComboBoxes that are posted on this request object
Supported API: true- Specified by:
getComboBoxin interfaceFormDataHolder- Returns:
- Map
-
getCompContext
Gets the value of the attribute: compContext.
Supported API: true- Returns:
- String
-
getComponentMode
Gets the value of the attribute: componentMode.
Supported API: true- Returns:
- ComponentMode
-
getComponentType
Gets the value of the attribute: componentType.
Supported API: true- Returns:
- ComponentType
-
getComponentContext
Gets the value of the attribute: componentContext.
Supported API: true- Returns:
- ComponentType
-
getContextObject
Gets the value of the attribute: contextObject; The contextObject WTReference can be used to indcate which object should be used to perfrom validation. contextObject should be used in cases where validation is always being performed against a single object. If the requested validation could be performed against multiple objects, the targetObjects attribute should be used instead.
Supported API: true- Returns:
- WTReference
-
getContextObject_nonPersistable
Gets the value of the attribute: contextObject_nonPersistable; The contextObject WTReference can be used to indcate which object should be used to perfrom validation. contextObject should be used in cases where validation is always being performed against a single object. If the requested validation could be performed against multiple objects, the targetObjects attribute should be used instead.
Supported API: true- Returns:
- Object
-
getFormData
Gets the value of the attribute: formData; The formData attribute can be used to pass a Map of form data (e.g., from a form being submitted) to the validation service.
Supported API: true- Returns:
- Map
-
getInitialItemsByName
Returns the list of initial NmOids for objects which are associated to the component with the nameparam_name.
Supported API: true- Specified by:
getInitialItemsByNamein interfaceFormDataHolder- Parameters:
param_name- The name of the component with the initial items (for example: table ID)- Returns:
- a list of initial oids that are from the component.
Supported API: true
-
getInWorkspace
Gets the value of the attribute: inWorkspace; The inWorkspace attribute can be used to specify whether or not the validation is being performed for an action or component in a Windchill workspace.
Supported API: true- Returns:
- Boolean
-
getNewChecked
Supported API: true- Specified by:
getNewCheckedin interfaceFormDataHolder- Returns:
- Map<String,List
> - Throws:
WTException
-
getParameterMap
Supported API: true- Specified by:
getParameterMapin interfaceFormDataHolder- Returns:
- HashMap<String,Object>
-
getParentContainer
Gets the value of the attribute: parentContainer; The parentContainer attribute can be used to indcate which container should be used to perfrom validation.
Supported API: true- Returns:
- WTContainerRef
-
getParentOrg
Gets the value of the attribute: parentOrg; The parentOrg attribute can be used to indcate which organization should be used to perfrom validation.
Supported API: true- Returns:
- WTPrincipalReference
-
getRadio
Supported API: true- Specified by:
getRadioin interfaceFormDataHolder- Returns:
- Map
-
getRemovedItemsByName
Supported API: true- Specified by:
getRemovedItemsByNamein interfaceFormDataHolder- Parameters:
param_name-- Returns:
- List
-
getRequestDataParameterMap
This method returns the equivalent of calling NmCommandBean.getRequestData().getParameterMap()
Supported API: true- Returns:
- Map
-
getCgiData
This method returns the equivalent of calling NmCommandBean.getRequestData().getCgiData()
Supported API: true- Returns:
- Properties
-
getSelected
Supported API: true- Returns:
- List
-
getSelectedInOpener
Supported API: true- Returns:
- List
-
getSelectedOidForPopup
Supported API: true- Returns:
- List
- Throws:
WTException
-
getSelectedRowObject
Gets the value of the attribute: selectedRowObject; The selectedRowObject WTReference is used to represent the row object in a table where a table row (icon) action is selected. This attribute would likely only be used in the validateSelectedAction method.
Supported API: true- Returns:
- WTReference
-
getSelectedRowObjectID
Gets the value of the attribute: selectedRowObjectID; The selectedRowObjectID String is used to represent the non-persistable row object in a table where a table row (icon) action is selected. This attribute would likely only be used in the validateSelectedAction method where the table row objects are not Persistable.
Supported API: true- Returns:
- String
-
getTargetObjects
Gets the value of the attribute: targetObjects; The targetObjects WTCollection can be used to indcate which object(s) should be used to perfrom validation. targetObjects should be used in cases where validation could be performed against multiple objects. If the requested validation is always being performed against a single object, the contextObject attribute should be used instead.
Supported API: true- Returns:
- WTCollection
-
getText
Gets the value of the attribute: text; You can stick any data you want into this map to communicate them to the server side. Please use ArrayList to communicate more than one value for a given key. A suggested usage is similar to the one of request attributes container.
Supported API: true- Specified by:
getTextin interfaceFormDataHolder- Returns:
- Map
-
getTextArea
* Gets the value of the attribute: textArea; The text areas that are posted on this request object
Supported API: true- Specified by:
getTextAreain interfaceFormDataHolder- Returns:
- Map
-
getTextParameter
Returns the value of the form data element specified by the key argument.
Supported API: true- Specified by:
getTextParameterin interfaceFormDataHolder- Parameters:
key-- Returns:
- String
-
getTextParameterValues
Returns the values of the form data element specified by the key argument.
Supported API: true- Specified by:
getTextParameterValuesin interfaceFormDataHolder- Parameters:
key-- Returns:
- String[]
-
getUnChecked
Supported API: true- Specified by:
getUnCheckedin interfaceFormDataHolder- Returns:
- Map
- Throws:
WTException
-
getUser
Gets the value of the attribute: user; The user attribute can be used to indcate which user should be used to perfrom validation.
Supported API: true- Returns:
- WTPrincipalReference
-
getUserAgent
Gets the value of the attribute: userAgent from the request data.
Supported API: true- Returns:
- UserAgent
-