org.drools.guvnor.server.contenthandler
Class ContentHandler

java.lang.Object
  extended by org.drools.guvnor.server.contenthandler.ContentHandler
Direct Known Subclasses:
BaseXStreamContentHandler, BPELHandler, BPMN2ProcessHandler, BRLContentHandler, DecisionTableXLSHandler, DefaultContentHandler, DSLRuleContentHandler, FactModelContentHandler, GuidedDTContentHandler, ModelContentHandler, PlainTextContentHandler, PropertiesHandler, RuleFlowHandler

public abstract class ContentHandler
extends Object

All content handlers must implement this, and be registered in content_types.properties


Constructor Summary
ContentHandler()
           
 
Method Summary
 boolean isRuleAsset()
           
protected  String parentNameFromCategory(AssetItem asset, String currentParent)
          Search Categories in a package against the current rule to see if the current rule should be extended, via another rule.
abstract  void retrieveAssetContent(RuleAsset asset, PackageItem pkg, AssetItem item)
          When loading asset content.
abstract  void storeAssetContent(RuleAsset asset, AssetItem repoAsset)
          For storing the asset content back into the repo node (any changes).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentHandler

public ContentHandler()
Method Detail

retrieveAssetContent

public abstract void retrieveAssetContent(RuleAsset asset,
                                          PackageItem pkg,
                                          AssetItem item)
                                   throws com.google.gwt.user.client.rpc.SerializationException
When loading asset content.

Parameters:
asset - The target.
item - The source.
Throws:
com.google.gwt.user.client.rpc.SerializationException

storeAssetContent

public abstract void storeAssetContent(RuleAsset asset,
                                       AssetItem repoAsset)
                                throws com.google.gwt.user.client.rpc.SerializationException
For storing the asset content back into the repo node (any changes).

Parameters:
asset -
repoAsset -
Throws:
com.google.gwt.user.client.rpc.SerializationException

isRuleAsset

public boolean isRuleAsset()
Returns:
true if the current content type is for a rule asset. If it is a rule asset, then it can be assembled into a package. If its not, then it is there, nominally to support compiling or validation/testing of the package (eg a model, or a dsl file).

parentNameFromCategory

protected String parentNameFromCategory(AssetItem asset,
                                        String currentParent)
Search Categories in a package against the current rule to see if the current rule should be extended, via another rule. IE rule rule1 extends rule2 This is an implementation of that DRL feature, via Category to Rule mappings in Guvnor

Parameters:
asset -
Returns:
rule that should be extended, based on categories


Copyright © 2001-2011 JBoss Inc.. All Rights Reserved.