|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.adobe.icomm.assetplacement.model.Validator
public class Validator
This class validates a PackageDefinition instance, returning an array of validation issues.
Field Summary | |
---|---|
static String |
ERROR_CONTROLLER_ID_EMPTY
A controller with an empty id. |
static String |
ERROR_CONTROLLER_ID_INVALID
A controller with an ID containing bad characters. |
static String |
ERROR_CONTROLLER_ID_KEYWORD
Controller ID conflicts with an ActionScript keyword. |
static String |
ERROR_CONTROLLER_SIZE_MISSING
Controller size required and not specified. |
static String |
ERROR_CONTROLLER_SIZE_PERCENT
Controller size was specified as a percentage, but must be absolute. |
static String |
ERROR_MISSING_CONTROLLER
Controller ID is referenced by an asset, but is missing from the package. |
static String |
ERROR_MISSING_CONTROLLER_REFERENCE
Controller ID reference is missing from an asset. |
static String |
ERROR_PACKAGE_VERSION_INVALID
Unknown package version. |
static String |
ERROR_SLIDESHOW_DELAY_INVALID
Controller size was specified as a percentage, but must be absolute. |
static String |
ERROR_XFA_TYPE_REQUIRES_PACKAGE_2
Package type XFA requires a package version of 2.0 or higher. |
static String |
ID_REGEX
Regular expression used to validate an ActionScript id. |
static String |
WARN_UNRECOGNIZED_CONTROLLER
A controller we don't recognize (ie, not PromoImage, PromoImageSlideShow, etc). |
Constructor Summary | |
---|---|
Validator()
|
Method Summary | |
---|---|
void |
addFormattedMessage(ValidationMessage message)
Add a completely formatted message to the current list of validation messages. |
void |
addMessage(String messageId,
boolean isError,
Object[] args)
Format and add a message to the current list of validation messages. |
static String[] |
getReservedWordList()
Accessor for the reserved words list. |
List |
validate(PackageDefinition packageDef)
Run validation against the PackageDefinition instance passed in, and return a list of validation messages. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String WARN_UNRECOGNIZED_CONTROLLER
public static final String ERROR_CONTROLLER_ID_EMPTY
public static final String ERROR_CONTROLLER_ID_INVALID
public static final String ERROR_CONTROLLER_ID_KEYWORD
public static final String ERROR_CONTROLLER_SIZE_MISSING
public static final String ERROR_CONTROLLER_SIZE_PERCENT
public static final String ERROR_SLIDESHOW_DELAY_INVALID
public static final String ERROR_MISSING_CONTROLLER
public static final String ERROR_MISSING_CONTROLLER_REFERENCE
public static final String ERROR_PACKAGE_VERSION_INVALID
public static final String ERROR_XFA_TYPE_REQUIRES_PACKAGE_2
public static final String ID_REGEX
Constructor Detail |
---|
public Validator()
Method Detail |
---|
public static String[] getReservedWordList()
public List validate(PackageDefinition packageDef) throws InvalidPackageException
packageDef
- the package to validate
InvalidPackageException
public void addMessage(String messageId, boolean isError, Object[] args)
messageId
- ID for the message, from the constants in this classisError
- true for errors, false for warningsargs
- optional values used in formatting the messagepublic void addFormattedMessage(ValidationMessage message)
message
- the message to add
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |