Class ValidateMediator

    • Constructor Detail

      • ValidateMediator

        public ValidateMediator()
    • Method Detail

      • mediate

        public boolean mediate​(MessageContext synCtx)
        Description copied from interface: Mediator
        Invokes the mediator passing the current message for mediation. Each mediator performs its mediation action, and returns true if mediation should continue, or false if further mediation should be aborted.
        Specified by:
        mediate in interface Mediator
        Overrides:
        mediate in class AbstractListMediator
        Parameters:
        synCtx - the current message for mediation
        Returns:
        true if further mediation should continue
      • mediate

        public boolean mediate​(MessageContext synCtx,
                               ContinuationState continuationState)
        Description copied from interface: FlowContinuableMediator
        Mediate the message using a ContinuationState. This is used when mediating the response message when service is invoked using a Call Mediator.
        Specified by:
        mediate in interface FlowContinuableMediator
        Parameters:
        synCtx - MessageContext
        continuationState - ContinuationState
        Returns:
        whether mediation flow is completed
      • getFeature

        public Object getFeature​(String key)
        Get a mediator feature. The common use case is a feature for the underlying Xerces validator
        Parameters:
        key - property key / feature name
        Returns:
        property string value (usually true|false)
      • addFeature

        public void addFeature​(String featureName,
                               boolean isFeatureEnable)
                        throws SAXException
        add a feature which need to set for the Schema Factory
        Parameters:
        featureName - The name of the feature
        isFeatureEnable - should this feature enable?(true|false)
        Throws:
        SAXException - on an unknown feature
        See Also:
        getFeature(String)
      • setSchemaKeys

        public void setSchemaKeys​(List<Value> schemaKeys)
        Set a list of local property names which refer to a list of schemas to be used for validation
        Parameters:
        schemaKeys - list of local property names
      • setSource

        public void setSource​(SynapsePath source)
        Set the given XPath as the source XPath
        Parameters:
        source - an XPath to be set as the source
      • setResourceMap

        public void setResourceMap​(ResourceMap resourceMap)
        Set the External Schema ResourceMap that will required for schema validation
        Parameters:
        resourceMap - the ResourceMap which contains external schema resources
      • getSource

        public SynapsePath getSource()
        Get the source XPath which yields the source element for validation
        Returns:
        the XPath which yields the source element for validation
      • getSchemaKeys

        public List<Value> getSchemaKeys()
        The keys for the schema resources used for validation
        Returns:
        schema registry keys
      • getFeatures

        public List<MediatorProperty> getFeatures()
        Features for the actual Xerces validator
        Returns:
        explicityFeatures to be passed to the Xerces validator
      • getResourceMap

        public ResourceMap getResourceMap()
        ResourceMap for the external schema resources to be used for the validation
        Returns:
        the ResourceMap with external schema resources
      • setCacheSchema

        public void setCacheSchema​(boolean cacheSchema)
        Set whether schema need to cache or not.
        Parameters:
        cacheSchema - cache the schema or not.
      • isCacheSchema

        public boolean isCacheSchema()
        Check whether to cahce the schemas.
        Returns:
        whether to cache or not.