SOA Governance and API Management : CentraSite Developers Guide : Application Framework : Querying the Registry : Extending the Application Framework
Extending the Application Framework
There are several points where the user can extend the existing Application Framework functionality.
Properties
Each Java bean property is internally represented as a com.softwareag.centrasite.appl.framework.mapping.Property instance.
The recommended way of creating a new property is by extending, directly or indirectly, the BaseProperty class (com.softwareag.centrasite.appl.framework.mapping.BaseProperty).
To map the information from a given annotation to the new Property correctly, a user-defined Property Processor that implements the PropertyAnnotationProcessor (com.softwareag.centrasite.appl.framework.PropertyAnnotationProcessor) must be created.
Then the newly created PropertyProcessor must be added to the list of processors in the BeanTypeAnnotationProcessor (com.softwareag.centrasite.appl.framework.BeanTypeAnnotationProcessor) using the addAnnnotationProcessor(Class<?> annotationType, PropertyAnnotationProcessor annotationProcessor) method.
Property Mapper
Each property value must be transferred to/from the underlying registry object. For that purpose, CSAF provides the (com.softwareag.centrasite.appl.framework.persistence.mapper.PropertyMapper) interface.
Users can provide their own implementation of the PropertyMapper interface by hooking it to a given type of Property. Such a property mapper is registered using the com.softwareag.centrasite.appl.framework.persistence.mapper.PropertyMapperFactory.addHandler (PropertyMapperFactory.Handler) method.
Predicate
The preferred method of creating a custom-defined predicate is to extend the DefaultPredicate (com.softwareag.centrasite.appl.framework.persistence.search.impl.DefaultPredicate) class directly or indirectly. Another way is to directly implement the Predicate interface (com.softwareag.centrasite.appl.framework.persistence.search.Predicate), although this is not recommended because it does not offer default behavior.
To use this newly-created predicate, the user must create a custom defined predicate handler, which must implement the PredicateHandler interface (com.softwareag.centrasite.appl.framework.persistence.search.PredicateHandler). This predicate handler must be added to the PredicateFactory (com.softwareag.centrasite.appl.framework.persistence.search.impl.PredicateFactory) list of predicate handlers by calling addPredicateHandler(PredicateHandler handler).
Copyright © 2015- 2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback