com.atlassian.gadgets.publisher.internal.impl
Class GadgetSpecValidatorImpl
java.lang.Object
com.atlassian.gadgets.publisher.internal.impl.GadgetSpecValidatorImpl
- All Implemented Interfaces:
- GadgetSpecValidator
public final class GadgetSpecValidatorImpl
- extends Object
- implements GadgetSpecValidator
Implements spec validation through XML schemas.
Method Summary |
boolean |
isValid(InputStream spec)
Returns true if the specified gadget spec is valid against the XML
schema provided at construction time, false otherwise. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GadgetSpecValidatorImpl
public GadgetSpecValidatorImpl()
isValid
public boolean isValid(InputStream spec)
- Returns true if the specified gadget spec is valid against the XML
schema provided at construction time, false otherwise. Null values
for
spec
will be rejected. If validation fails, an error
will be logged at the DEBUG level.
- Specified by:
isValid
in interface GadgetSpecValidator
- Parameters:
spec
- the gadget spec to validate against the schema
- Returns:
- true if the spec validates, false otherwise
- Throws:
NullPointerException
- if spec
is null
Copyright © 2013 Atlassian. All Rights Reserved.