| |
|
| java.lang.Object org.drools.repository.Item org.drools.repository.VersionableItem org.drools.repository.CategorisableItem org.drools.repository.AssetItem
AssetItem | public class AssetItem extends CategorisableItem (Code) | | The RuleItem class is used to abstract away the details of the underlying JCR repository.
It is used to pass information about rules stored in the repository.
author: btruitt |
Constructor Summary | |
public | AssetItem(RulesRepository rulesRepository, Node node) Constructs a RuleItem object, setting its node attribute to the specified node. | public | AssetItem() |
CONTENT_PROPERTY_ATTACHMENT_FILENAME | final public static String CONTENT_PROPERTY_ATTACHMENT_FILENAME(Code) | | |
CONTENT_PROPERTY_BINARY_NAME | final public static String CONTENT_PROPERTY_BINARY_NAME(Code) | | |
CONTENT_PROPERTY_NAME | final public static String CONTENT_PROPERTY_NAME(Code) | | |
DATE_EFFECTIVE_PROPERTY_NAME | final public static String DATE_EFFECTIVE_PROPERTY_NAME(Code) | | The name of the date effective property on the rule node type
|
DATE_EXPIRED_PROPERTY_NAME | final public static String DATE_EXPIRED_PROPERTY_NAME(Code) | | The name of the date expired property on the rule node type
|
PACKAGE_NAME_PROPERTY | final public static String PACKAGE_NAME_PROPERTY(Code) | | |
RULE_NODE_TYPE_NAME | final public static String RULE_NODE_TYPE_NAME(Code) | | The name of the rule node type
|
AssetItem | public AssetItem(RulesRepository rulesRepository, Node node) throws RulesRepositoryException(Code) | | Constructs a RuleItem object, setting its node attribute to the specified node.
Parameters: rulesRepository - the rulesRepository that instantiated this object Parameters: node - the node in the repository that this RuleItem corresponds to throws: RulesRepositoryException - |
AssetItem | public AssetItem()(Code) | | |
getBinaryContentAsBytes | public byte[] getBinaryContentAsBytes()(Code) | | This is a convenience method for returning the binary data as a byte array.
|
getBinaryContentAttachment | public InputStream getBinaryContentAttachment()(Code) | | If this asset contains binary data, this is how you return it.
Otherwise it will return null.
|
getBinaryContentAttachmentFileName | public String getBinaryContentAttachmentFileName()(Code) | | Get the name of the "file" attachment, if one is set. Null otherwise
|
getContent | public String getContent() throws RulesRepositoryException(Code) | | returns the string contents of the rule node.
If this is a binary asset, this will return null (use getBinaryContent instead).
|
getPackage | public PackageItem getPackage()(Code) | | This will get the package an asset item belongs to.
|
getPackageName | public String getPackageName()(Code) | | Get the name of the enclosing package.
As assets are stored in versionable subfolders, this means walking up 2 levels in the
hierarchy to get to the enclosing "package" node.
|
getUserProperty | public String getUserProperty(String property)(Code) | | A property value (for a user defined property). |
remove | public void remove()(Code) | | This will remove the item.
The repository will need to be saved for this to take effect.
Typically the package that contains this should be versioned before removing this,
to make it easy to roll back.
|
toString | public String toString()(Code) | | Nicely formats the information contained by the node that this object encapsulates
|
updateBinaryContentAttachment | public AssetItem updateBinaryContentAttachment(InputStream data)(Code) | | If the asset is a binary asset, then use this to update the content
(do NOT use text).
|
updateBinaryContentAttachmentFileName | public void updateBinaryContentAttachmentFileName(String name)(Code) | | Optionally set the filename to be associated with the binary content.
|
updateContent | public AssetItem updateContent(String newRuleContent) throws RulesRepositoryException(Code) | | This will update the asset's content (checking it out if it is not already).
This will not save the session or create a new version of the node
(this has to be done seperately, as several properties may change as part of one edit).
This is only used if the asset is a textual asset. For binary, use the updateBinaryContent method
instead.
|
updateDateEffective | public void updateDateEffective(Calendar newDateEffective) throws RulesRepositoryException(Code) | | Creates a new version of this object's rule node, updating the effective date for the
rule node.
Parameters: newDateEffective - the new effective date for the rule throws: RulesRepositoryException - |
updateUserProperty | public void updateUserProperty(String propertyName, String value)(Code) | | This updates a user defined property (not one of the intrinsic ones).
|
|
|
|