filenet.vw.api
Class VWValidationError
- java.lang.Object
-
- filenet.vw.api.VWValidationError
-
public final class VWValidationError extends java.lang.ObjectUse this class to access information about errors encountered during the workflow definition validation process.- Since:
- VWWS3.10
-
-
Field Summary
Fields Modifier and Type Field and Description static intVALIDATION_LEVEL_ERRORValue of 1. Indicates that a validation error will either cause the transfer to fail or cause a problem at runtime.static intVALIDATION_LEVEL_WARNINGValue of 2. Indicates that a validation error may possibly cause either the transfer to fail or a problem at runtime.static intVALIDATION_TYPE_ANNOTATIONInteger value 12. Specifies that the validation item is a text annotation definition.static intVALIDATION_TYPE_FIELDInteger value 4. Specifies that the validation item is a field.static intVALIDATION_TYPE_INSTRUCTIONInteger value 7. Specifies that the validation item is a instruction.static intVALIDATION_TYPE_MILESTONEInteger value 8. Specifies that the validation item is a milestone.static intVALIDATION_TYPE_PARAMETERInteger value 3. Specifies that the validation item is a parameter.static intVALIDATION_TYPE_PARTNERLINKInteger value 10. Specifies that the validation item is a partnerlink.static intVALIDATION_TYPE_ROUTEInteger value 2. Specifies that the validation item is a route.static intVALIDATION_TYPE_RULESETInteger value 9. Specifies that the validation item is a ruleset.static intVALIDATION_TYPE_SCHEMAInteger value 11. Specifies that the validation item is a schema definition.static intVALIDATION_TYPE_STEPValue of 1. Specifies that the validation item is a step.static intVALIDATION_TYPE_WORKFLOWInteger value 6. Specifies that the validation item is a workflow.static intVALIDATION_TYPE_WORKFLOW_COLLECTIONInteger value 13. Specifies that the validation item is a workflow collection.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description intgetErrorType()Retrieves the value in the errorType property of this validation error.intgetId()Deprecated.Replaced byVWValidationError.getStepId(),VWMapDefinition.getMapId(), andVWValidationError.getSubStepId()in combination. Gets the value in the ID property of this validation error.java.lang.StringgetInfo()Retrieves detailed information regarding the validation error, such as the name of a field or a parameter.intgetLevel()Gets the value of the level property of the current validation error.static java.lang.StringgetLocalizedValidationLevelString(int theValidationLevel)Retrieves the localized string corresponding to the specified validation level.static java.lang.StringgetLocalizedValidationTypeString(int theValidationType)Retrieves the localized string corresponding to the specified validation type.java.lang.StringgetMapName()Gets the value in the map name property of this instance.java.lang.StringgetMessage()Retrieves the value in the message property of this validation error.java.lang.StringgetName()Gets the name of the object that contains the error.intgetStepId()Gets an integer representing the step ID property of the current validation error.intgetSubStepId()Gets an integer representing the ID property of the object that caused the current validation error within the current step.java.lang.StringtoString()Returns a String representing this instance.
-
-
-
Field Detail
-
VALIDATION_TYPE_STEP
public static final int VALIDATION_TYPE_STEP
Value of 1. Specifies that the validation item is a step.- See Also:
- Constant Field Values
-
VALIDATION_TYPE_ROUTE
public static final int VALIDATION_TYPE_ROUTE
Integer value 2. Specifies that the validation item is a route.- See Also:
- Constant Field Values
-
VALIDATION_TYPE_PARAMETER
public static final int VALIDATION_TYPE_PARAMETER
Integer value 3. Specifies that the validation item is a parameter.- See Also:
- Constant Field Values
-
VALIDATION_TYPE_FIELD
public static final int VALIDATION_TYPE_FIELD
Integer value 4. Specifies that the validation item is a field.- See Also:
- Constant Field Values
-
VALIDATION_TYPE_WORKFLOW
public static final int VALIDATION_TYPE_WORKFLOW
Integer value 6. Specifies that the validation item is a workflow.- See Also:
- Constant Field Values
-
VALIDATION_TYPE_INSTRUCTION
public static final int VALIDATION_TYPE_INSTRUCTION
Integer value 7. Specifies that the validation item is a instruction.- See Also:
- Constant Field Values
-
VALIDATION_TYPE_MILESTONE
public static final int VALIDATION_TYPE_MILESTONE
Integer value 8. Specifies that the validation item is a milestone.- See Also:
- Constant Field Values
-
VALIDATION_TYPE_RULESET
public static final int VALIDATION_TYPE_RULESET
Integer value 9. Specifies that the validation item is a ruleset.- See Also:
- Constant Field Values
-
VALIDATION_TYPE_PARTNERLINK
public static final int VALIDATION_TYPE_PARTNERLINK
Integer value 10. Specifies that the validation item is a partnerlink.- See Also:
- Constant Field Values
-
VALIDATION_TYPE_SCHEMA
public static final int VALIDATION_TYPE_SCHEMA
Integer value 11. Specifies that the validation item is a schema definition.- See Also:
- Constant Field Values
-
VALIDATION_TYPE_ANNOTATION
public static final int VALIDATION_TYPE_ANNOTATION
Integer value 12. Specifies that the validation item is a text annotation definition.- See Also:
- Constant Field Values
-
VALIDATION_TYPE_WORKFLOW_COLLECTION
public static final int VALIDATION_TYPE_WORKFLOW_COLLECTION
Integer value 13. Specifies that the validation item is a workflow collection.- See Also:
- Constant Field Values
-
VALIDATION_LEVEL_ERROR
public static final int VALIDATION_LEVEL_ERROR
Value of 1. Indicates that a validation error will either cause the transfer to fail or cause a problem at runtime.- See Also:
- Constant Field Values
-
VALIDATION_LEVEL_WARNING
public static final int VALIDATION_LEVEL_WARNING
Value of 2. Indicates that a validation error may possibly cause either the transfer to fail or a problem at runtime. Warnings will usually be issued in situations where the validation algorithm does not have enough information to decide that a potential problem will cause an error. For example, a call made to a map that does not exist in the referenced workflow will generate a warning rather than an error, because it may be that the map is defined (as an instruction sheet) on the server side in a base WorkClass. In this case, the transfer would succeed.- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
public java.lang.String getName()
Gets the name of the object that contains the error.- Returns:
- A String containing the name of the object in which the error occured.
-
getInfo
public java.lang.String getInfo()
Retrieves detailed information regarding the validation error, such as the name of a field or a parameter.- Returns:
- A String containing the detailed error information, or null if no error occured.
-
getMessage
public java.lang.String getMessage()
Retrieves the value in the message property of this validation error.- Returns:
- A String containing the value in the message property of this validation error.
-
getErrorType
public int getErrorType()
Retrieves the value in the errorType property of this validation error.- Returns:
- An integer representing the contents of the errorType property of this validation error.
-
getLevel
public int getLevel()
Gets the value of the level property of the current validation error.- Returns:
- An integer representing either VALIDATION_LEVEL_ERROR (1) or VALIDATION_LEVEL_WARNING (2).
- See Also:
VWValidationError.VALIDATION_LEVEL_ERROR,VWValidationError.VALIDATION_LEVEL_WARNING
-
getId
public int getId()
Deprecated. Replaced byVWValidationError.getStepId(),VWMapDefinition.getMapId(), andVWValidationError.getSubStepId()in combination. Gets the value in the ID property of this validation error.- Returns:
- An integer value that represents the contents of the
ID property of this validation error.
For compatibility,
this method returns a Step ID, but
the use of sub-maps in the workflow definition
means that a Step ID alone is no longer sufficient to locate the
object causing a validation error.
Note An error in a simple step requires the Step ID and the Map ID; an error in a compound step instruction requires a Map ID, a Step ID, and a sub-step ID.
- See Also:
VWValidationError.getStepId(),VWMapDefinition.getMapId(),VWValidationError.getSubStepId()
-
getMapName
public java.lang.String getMapName()
Gets the value in the map name property of this instance. The map name can be used to get the map that has the error.- Returns:
- A String containing the map name property of this instance, or null if the error type is
VALIDATION_TYPE_FIELD. A valid map name will be returned if the error type is one of the following:
- VALIDATION_TYPE_STEP
- VALIDATION_TYPE_INSTRUCTION
- VALIDATION_TYPE_PARAMETER
- VALIDATION_TYPE_ROUTE
- VALIDATION_TYPE_ANNOTATION
- See Also:
VWWorkflowDefinition,VWValidationError.getStepId(),VWValidationError.getSubStepId()
-
getStepId
public int getStepId()
Gets an integer representing the step ID property of the current validation error. The Map ID will be required in order to locate the invalid step.If the error type is VALIDATION_TYPE_ANNOTATION, this method will return the annotation id. The Map ID will be required in order to locate the invalid annotation.
- Returns:
- An integer representing the step ID property of this
validation error. The error type values that can be returned are as follows:
- 1: VALIDATION_TYPE_STEP
- 2: VALIDATION_TYPE_ROUTE
- 3: VALIDATION_TYPE_PARAMETER
- 7: VALIDATION_TYPE_INSTRUCTION
- -1: Other (undefined)
- See Also:
VWMapDefinition.getMapId(),VWValidationError.getSubStepId()
-
getSubStepId
public int getSubStepId()
Gets an integer representing the ID property of the object that caused the current validation error within the current step.Locating the invalid substep object (a VWInstructionDefinition or a VWRouteDefinition) requires the Step ID and the Map ID. You can get these IDs with
getStepIDandVWMapDefinition.getMapId.- Returns:
- The ID property of the substep object that caused the
current validation error. This can be any one of the following:
- 2: VALIDATION_TYPE_ROUTE
- 7: VALIDATION_TYPE_INSTRUCTION
- -1: Undefined
- See Also:
VWValidationError.getStepId(),VWMapDefinition.getMapId()
-
toString
public java.lang.String toString()
Returns a String representing this instance.- Overrides:
toStringin classjava.lang.Object- Returns:
- A String containing a text representation of the
validation error message. The string is formatted as follows:
<error type>:<error level>:<object name>:<additional information>:<map ID>:<step ID>:<instruction ID>:<error message>
-
getLocalizedValidationTypeString
public static java.lang.String getLocalizedValidationTypeString(int theValidationType) throws VWExceptionRetrieves the localized string corresponding to the specified validation type.- Parameters:
theValidationType- An integer value associated with validation type.- Returns:
- A String representation of the specified validation type.
- Throws:
VWException- Thrown if the validation type is not valid.- Since:
- PE 5.2.0.1
-
getLocalizedValidationLevelString
public static java.lang.String getLocalizedValidationLevelString(int theValidationLevel) throws VWExceptionRetrieves the localized string corresponding to the specified validation level.- Parameters:
theValidationlevel- An integer value associated with validation level.- Returns:
- A String representation of the specified validation level.
- Throws:
VWException- Thrown if the validation level is not valid.- Since:
- PE 5.2.0.1
-
-