Java Doc for AssetItem.java in  » Rule-Engine » drolls-Rule-Engine » org » drools » repository » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Rule Engine » drolls Rule Engine » org.drools.repository 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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


Field Summary
final public static  StringCONTENT_PROPERTY_ATTACHMENT_FILENAME
    
final public static  StringCONTENT_PROPERTY_BINARY_NAME
    
final public static  StringCONTENT_PROPERTY_NAME
    
final public static  StringDATE_EFFECTIVE_PROPERTY_NAME
    
final public static  StringDATE_EXPIRED_PROPERTY_NAME
    
final public static  StringPACKAGE_NAME_PROPERTY
    
final public static  StringRULE_NODE_TYPE_NAME
    

Constructor Summary
public  AssetItem(RulesRepository rulesRepository, Node node)
     Constructs a RuleItem object, setting its node attribute to the specified node.
public  AssetItem()
    

Method Summary
public  byte[]getBinaryContentAsBytes()
     This is a convenience method for returning the binary data as a byte array.
public  InputStreamgetBinaryContentAttachment()
     If this asset contains binary data, this is how you return it.
public  StringgetBinaryContentAttachmentFileName()
     Get the name of the "file" attachment, if one is set.
public  StringgetContent()
     returns the string contents of the rule node.
public  CalendargetDateEffective()
    
public  CalendargetDateExpired()
    
public  AssetHistoryIteratorgetHistory()
    
public  PackageItemgetPackage()
     This will get the package an asset item belongs to.
public  StringgetPackageName()
     Get the name of the enclosing package.
public  VersionableItemgetPrecedingVersion()
    
public  VersionableItemgetSucceedingVersion()
    
public  StringgetUserProperty(String property)
    
public  voidremove()
     This will remove the item.
public  StringtoString()
    
public  AssetItemupdateBinaryContentAttachment(InputStream data)
     If the asset is a binary asset, then use this to update the content (do NOT use text).
public  voidupdateBinaryContentAttachmentFileName(String name)
     Optionally set the filename to be associated with the binary content.
public  AssetItemupdateContent(String newRuleContent)
     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.
public  voidupdateDateEffective(Calendar newDateEffective)
     Creates a new version of this object's rule node, updating the effective date for the rule node.
public  voidupdateDateExpired(Calendar newDateExpired)
     Creates a new version of this object's rule node, updating the expired date for the rule node.
public  voidupdateUserProperty(String propertyName, String value)
     This updates a user defined property (not one of the intrinsic ones).

Field Detail
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




Constructor Detail
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)




Method Detail
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).



getDateEffective
public Calendar getDateEffective() throws RulesRepositoryException(Code)
the date the rule becomes effective
throws:
  RulesRepositoryException -



getDateExpired
public Calendar getDateExpired() throws RulesRepositoryException(Code)
the date the rule becomes expired
throws:
  RulesRepositoryException -



getHistory
public AssetHistoryIterator getHistory()(Code)
An iterator over the nodes history.



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.



getPrecedingVersion
public VersionableItem getPrecedingVersion() throws RulesRepositoryException(Code)



getSucceedingVersion
public VersionableItem getSucceedingVersion() throws RulesRepositoryException(Code)



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 -



updateDateExpired
public void updateDateExpired(Calendar newDateExpired) throws RulesRepositoryException(Code)
Creates a new version of this object's rule node, updating the expired date for the rule node.
Parameters:
  newDateExpired - the new expired 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).



Methods inherited from org.drools.repository.CategorisableItem
public void addCategory(String tag) throws RulesRepositoryException(Code)(Java Doc)
public List getCategories() throws RulesRepositoryException(Code)(Java Doc)
public void removeCategory(String tag) throws RulesRepositoryException(Code)(Java Doc)
public void updateCategoryList(String[] categories)(Code)(Java Doc)

Fields inherited from org.drools.repository.VersionableItem
final public static String CATEGORY_PROPERTY_NAME(Code)(Java Doc)
final public static String CHECKIN_COMMENT(Code)(Java Doc)
final public static String CONTENT_PROPERTY_ARCHIVE_FLAG(Code)(Java Doc)
final public static String COVERAGE_PROPERTY_NAME(Code)(Java Doc)
final public static String CREATOR_PROPERTY_NAME(Code)(Java Doc)
final public static String DEFAULT_CONTENT_FORMAT(Code)(Java Doc)
final public static String DESCRIPTION_PROPERTY_NAME(Code)(Java Doc)
final public static String FORMAT_PROPERTY_NAME(Code)(Java Doc)
final public static String LAST_CONTRIBUTOR_PROPERTY_NAME(Code)(Java Doc)
final public static String LAST_MODIFIED_PROPERTY_NAME(Code)(Java Doc)
final public static String PUBLISHER_PROPERTY_NAME(Code)(Java Doc)
final public static String RELATION_PROPERTY_NAME(Code)(Java Doc)
final public static String RIGHTS_PROPERTY_NAME(Code)(Java Doc)
final public static String SOURCE_PROPERTY_NAME(Code)(Java Doc)
final public static String STATE_PROPERTY_NAME(Code)(Java Doc)
final public static String SUBJECT_PROPERTY_NAME(Code)(Java Doc)
final public static String TITLE_PROPERTY_NAME(Code)(Java Doc)
final public static String TYPE_PROPERTY_NAME(Code)(Java Doc)
final public static String VERSION_NUMBER_PROPERTY_NAME(Code)(Java Doc)

Methods inherited from org.drools.repository.VersionableItem
public VersionableItem archiveItem(boolean data)(Code)(Java Doc)
protected void checkIsUpdateable()(Code)(Java Doc)
public void checkin(String comment)(Code)(Java Doc)
public void checkout()(Code)(Java Doc)
public String getCheckinComment() throws RulesRepositoryException(Code)(Java Doc)
public String getCoverage()(Code)(Java Doc)
public Calendar getCreatedDate()(Code)(Java Doc)
public String getCreator()(Code)(Java Doc)
public String getDescription() throws RulesRepositoryException(Code)(Java Doc)
public String getExternalRelation()(Code)(Java Doc)
public String getExternalSource()(Code)(Java Doc)
public String getFormat() throws RulesRepositoryException(Code)(Java Doc)
public String getLastContributor()(Code)(Java Doc)
public Calendar getLastModified() throws RulesRepositoryException(Code)(Java Doc)
protected long getLongProperty(String property)(Code)(Java Doc)
public String getName()(Code)(Java Doc)
abstract public VersionableItem getPrecedingVersion() throws RulesRepositoryException(Code)(Java Doc)
protected Node getPrecedingVersionNode() throws RulesRepositoryException(Code)(Java Doc)
ItemVersionIterator getPredecessorVersionsIterator() throws RulesRepositoryException(Code)(Java Doc)
public String getPublisher()(Code)(Java Doc)
protected Node getRealContentFromVersion(Node node) throws RepositoryException, PathNotFoundException(Code)(Java Doc)
public String getRights()(Code)(Java Doc)
public StateItem getState() throws RulesRepositoryException(Code)(Java Doc)
public String getStateDescription()(Code)(Java Doc)
protected String getStringProperty(String property)(Code)(Java Doc)
public String getSubject()(Code)(Java Doc)
abstract public VersionableItem getSucceedingVersion() throws RulesRepositoryException(Code)(Java Doc)
protected Node getSucceedingVersionNode() throws RulesRepositoryException(Code)(Java Doc)
ItemVersionIterator getSuccessorVersionsIterator() throws RulesRepositoryException(Code)(Java Doc)
public String getTitle() throws RulesRepositoryException(Code)(Java Doc)
public String getType()(Code)(Java Doc)
public String getUUID()(Code)(Java Doc)
public Node getVersionContentNode() throws RepositoryException, PathNotFoundException(Code)(Java Doc)
public long getVersionNumber()(Code)(Java Doc)
public String getVersionSnapshotUUID()(Code)(Java Doc)
public boolean isArchived()(Code)(Java Doc)
public boolean isHistoricalVersion() throws RepositoryException(Code)(Java Doc)
public boolean sameState(StateItem other)(Code)(Java Doc)
public void updateCoverage(String cov)(Code)(Java Doc)
public void updateDescription(String newDescriptionContent) throws RulesRepositoryException(Code)(Java Doc)
public void updateExternalRelation(String rel)(Code)(Java Doc)
public void updateExternalSource(String source)(Code)(Java Doc)
public void updateFormat(String newFormat)(Code)(Java Doc)
public void updatePublisher(String pub)(Code)(Java Doc)
public void updateRights(String rights)(Code)(Java Doc)
public void updateState(String stateName) throws RulesRepositoryException(Code)(Java Doc)
public void updateState(StateItem stateItem) throws RulesRepositoryException(Code)(Java Doc)
protected void updateStringProperty(String value, String prop)(Code)(Java Doc)
public void updateSubject(String sub)(Code)(Java Doc)
public void updateTitle(String title) throws RulesRepositoryException(Code)(Java Doc)
public void updateType(String type)(Code)(Java Doc)

Fields inherited from org.drools.repository.Item
Logger log(Code)(Java Doc)
protected Node node(Code)(Java Doc)
protected RulesRepository rulesRepository(Code)(Java Doc)

Methods inherited from org.drools.repository.Item
public boolean equals(Object obj)(Code)(Java Doc)
public String getName() throws RulesRepositoryException(Code)(Java Doc)
public Node getNode()(Code)(Java Doc)
public RulesRepository getRulesRepository()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.