org.drools.guvnor.server.contenthandler
Class ModelContentHandler

java.lang.Object
  extended by org.drools.guvnor.server.contenthandler.ContentHandler
      extended by org.drools.guvnor.server.contenthandler.ModelContentHandler
All Implemented Interfaces:
ICanHasAttachment

public class ModelContentHandler
extends ContentHandler
implements ICanHasAttachment

This is used for handling jar models for the rules.


Constructor Summary
ModelContentHandler()
           
 
Method Summary
static String convertPathToName(String name)
           
 void onAttachmentAdded(AssetItem asset)
          This is called when a model jar is attached, it will peer into it, and then automatically add imports if there aren't any already in the package header configuration.
 void onAttachmentRemoved(AssetItem item)
           
 void retrieveAssetContent(RuleAsset asset, PackageItem pkg, AssetItem item)
          When loading asset content.
 void storeAssetContent(RuleAsset asset, AssetItem repoAsset)
          For storing the asset content back into the repo node (any changes).
 
Methods inherited from class org.drools.guvnor.server.contenthandler.ContentHandler
isRuleAsset, parentNameFromCategory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelContentHandler

public ModelContentHandler()
Method Detail

retrieveAssetContent

public void retrieveAssetContent(RuleAsset asset,
                                 PackageItem pkg,
                                 AssetItem item)
                          throws com.google.gwt.user.client.rpc.SerializationException
Description copied from class: ContentHandler
When loading asset content.

Specified by:
retrieveAssetContent in class ContentHandler
Parameters:
asset - The target.
item - The source.
Throws:
com.google.gwt.user.client.rpc.SerializationException

storeAssetContent

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

Specified by:
storeAssetContent in class ContentHandler
Throws:
com.google.gwt.user.client.rpc.SerializationException

onAttachmentAdded

public void onAttachmentAdded(AssetItem asset)
                       throws IOException
This is called when a model jar is attached, it will peer into it, and then automatically add imports if there aren't any already in the package header configuration.

Specified by:
onAttachmentAdded in interface ICanHasAttachment
Throws:
IOException

onAttachmentRemoved

public void onAttachmentRemoved(AssetItem item)
                         throws IOException
Specified by:
onAttachmentRemoved in interface ICanHasAttachment
Throws:
IOException

convertPathToName

public static String convertPathToName(String name)


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