Java Doc for Asset.java in  » Content-Management-System » harmonise » org » openharmonise » rm » resources » content » 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 » Content Management System » harmonise » org.openharmonise.rm.resources.content 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.openharmonise.rm.resources.AbstractChildObject
   org.openharmonise.rm.resources.content.Asset

All known Subclasses:   org.openharmonise.rm.resources.xml.XSLResource,
Asset
public class Asset extends AbstractChildObject implements Publishable,Editable,Cloneable,Comparable(Code)
The Asset class represents Harmonise resources which reside on the local file system instead of in the database.
author:
   Michael Bell
version:
   $Revision: 1.9 $


Field Summary
final protected static  StringCLMN_MIME_TYPE
    
final protected static  StringCLMN_URI
    
final public static  StringPNAME_ASSET_ROOT_FILEPATH
    
final static  StringPNAME_SITE_URL
    
final public static  StringTAG_ASSET
    
final public static  StringTAG_CONTENT_TYPE
    
final public static  StringTAG_URI
    
final protected static  StringTBL_ASSET
    
protected  Stringm_sContentType
    
protected  Stringm_sURI
    

Constructor Summary
public  Asset()
    
public  Asset(AbstractDataStoreInterface dbintrf)
     Standard constructor for a new or anonymous resource.
public  Asset(AbstractDataStoreInterface dbintrf, int nId)
     Standard constructor for a known resource.

Method Summary
protected  voidaddColumnsToPopulateQuery(SelectStatement select, boolean bIsHist)
    
protected  voidaddDataToSave(InsertStatement insert)
    
public  voidclear()
    
public static  booleancopyFile(File from, File to)
     Copies an existing file to the specified file location.
protected static  FilecreateDir(String sDir)
     Returns a File representing a new directory in the file system.
protected  FilecreateFile()
     Returns a File which has a path correct for the current Asset.
public  voiddelete(boolean bDeleteHistory)
    
protected  booleanensureParentExists(File file)
     Returns true if the parent of the given File exists.
public  StringgetAssetRoot()
    
public  FilegetContentFile()
     Returns the File associated with this Asset.
public  StringgetContentType()
     Returns the mime type of this Asset.
public  StringgetDBTableName()
    
public  StringgetFullURL()
     Returns the full URI for this Asset, specifically including the installation site URI.
public  ColumnRefgetInstanceColumnRef(String sColumn, boolean bIsHist)
    
public  JoinConditionsgetInstanceJoinConditions(String sObjectTag, boolean bIsOuter)
    
public  StringgetParentObjectClassName()
    
protected  StringgetRelativePath(String sAbsolutePath)
     Returns the relative path for the given absolute path.
public  StringgetTagName()
    
public  StringgetURI()
     Returns the URI associated with this Asset.
protected  booleanisAssetSavedAsText(String sContentType)
     Returns true if an asset of the specified mime type should be saved in DB as text rather than as a file.
public  booleanisContentChanged()
     Returns true if the URI value for this Asset has changed.
public static  booleanmoveFile(File from, File to)
     Moves a file from one location to another.
protected  voidpopulateFromResultSetRow(ResultSet rs, SelectStatement select)
    
public  Elementpublish(Element topEl, HarmoniseOutput output, State state)
    
protected  voidsaveCoreData()
    
protected  voidsaveNonCoreData()
    
public  voidsetContentFile(File assetFile)
     Sets the content file associated with this Asset.
public  voidsetContentType(String sContentType)
     Sets the mime type of this Asset.
public  voidsetIsContentChanged(boolean bContentChanged)
     Sets the value of the content changed flag.
public  voidsetURI(String sContent)
     Sets the URI for this Asset.

Field Detail
CLMN_MIME_TYPE
final protected static String CLMN_MIME_TYPE(Code)
The mime type database column name



CLMN_URI
final protected static String CLMN_URI(Code)
The URI database column name



PNAME_ASSET_ROOT_FILEPATH
final public static String PNAME_ASSET_ROOT_FILEPATH(Code)
The configuration parameter name whose associated value specifies the file system directory to be used as the root of the asset store



PNAME_SITE_URL
final static String PNAME_SITE_URL(Code)
The site url configuration parameter name



TAG_ASSET
final public static String TAG_ASSET(Code)
The Asset tag name



TAG_CONTENT_TYPE
final public static String TAG_CONTENT_TYPE(Code)



TAG_URI
final public static String TAG_URI(Code)
The URI tag name



TBL_ASSET
final protected static String TBL_ASSET(Code)
The Asset database table name



m_sContentType
protected String m_sContentType(Code)
The mime type of this Asset



m_sURI
protected String m_sURI(Code)
The URI or file path of this Asset




Constructor Detail
Asset
public Asset()(Code)
Constructs a new or anonymous instance without an interface to the database



Asset
public Asset(AbstractDataStoreInterface dbintrf)(Code)
Standard constructor for a new or anonymous resource.
Parameters:
  dbintrf - the data store to register



Asset
public Asset(AbstractDataStoreInterface dbintrf, int nId)(Code)
Standard constructor for a known resource.
Parameters:
  dbintrf - the data store to register
Parameters:
  nId - the id of this resource




Method Detail
addColumnsToPopulateQuery
protected void addColumnsToPopulateQuery(SelectStatement select, boolean bIsHist) throws DataStoreException(Code)



addDataToSave
protected void addDataToSave(InsertStatement insert) throws DataStoreException(Code)



clear
public void clear()(Code)



copyFile
public static boolean copyFile(File from, File to)(Code)
Copies an existing file to the specified file location.
Parameters:
  from - the current file
Parameters:
  to - the copy file true if the operation was successful, otherwise false



createDir
protected static File createDir(String sDir)(Code)
Returns a File representing a new directory in the file system. Any parent directories which do not already exist will be created.
Parameters:
  sDir - The full path of the directory to create a File representing a new directory in thefile system



createFile
protected File createFile() throws AssetException, ConfigException, DataAccessException(Code)
Returns a File which has a path correct for the current Asset. Note: the file path will follow the pattern <asset root>/<first letter of asset name>/<asset name> for example 'C:\assets\F\foo.gif' a File which has a path correct for the current Asset.
throws:
  AssetException - if the parent directory of the new content file does not exist
throws:
  ConfigException - if an error occurs obtaining the asset rootconfiguration property
throws:
  DataAccessException - if an error occurs getting this object'sname, used for the file name



delete
public void delete(boolean bDeleteHistory) throws DataStoreException, DataAccessException, EditException, PopulateException(Code)



ensureParentExists
protected boolean ensureParentExists(File file)(Code)
Returns true if the parent of the given File exists. If the parent does not exist an attempt will be made to create it, if this fails the method will return false.
Parameters:
  file - the file whose parent's existance is to be tested true if the parent of the given File exists



getAssetRoot
public String getAssetRoot() throws DataAccessException(Code)
Returns the root file path for assets
throws:
  DataAccessException -



getContentFile
public File getContentFile() throws DataAccessException(Code)
Returns the File associated with this Asset. the File associated with this Asset
throws:
  DataAccessException - if an error occurs accessing the contentfile of this Asset



getContentType
public String getContentType() throws DataAccessException(Code)
Returns the mime type of this Asset. the mime type of this Asset
throws:
  DataAccessException - if an error occurs populating thisobject



getDBTableName
public String getDBTableName()(Code)



getFullURL
public String getFullURL() throws DataAccessException(Code)
Returns the full URI for this Asset, specifically including the installation site URI. the full URI for this Asset
throws:
  DataAccessException - if an error occurs populating the URI orobtaining the site URI



getInstanceColumnRef
public ColumnRef getInstanceColumnRef(String sColumn, boolean bIsHist) throws DataStoreException(Code)



getInstanceJoinConditions
public JoinConditions getInstanceJoinConditions(String sObjectTag, boolean bIsOuter) throws DataStoreException(Code)



getParentObjectClassName
public String getParentObjectClassName()(Code)



getRelativePath
protected String getRelativePath(String sAbsolutePath) throws DataAccessException(Code)
Returns the relative path for the given absolute path. Note: this assumes that the absolute path starts with the current asset root path
Parameters:
  sAbsolutePath -
throws:
  DataAccessException -



getTagName
public String getTagName()(Code)



getURI
public String getURI() throws DataAccessException(Code)
Returns the URI associated with this Asset. the URI associated with this Asset
throws:
  DataAccessException - if an error occurs populating thisobject from the database



isAssetSavedAsText
protected boolean isAssetSavedAsText(String sContentType)(Code)
Returns true if an asset of the specified mime type should be saved in DB as text rather than as a file.
Parameters:
  sContentType - the mime type true if asset should be saved in DB as text rather than as a file



isContentChanged
public boolean isContentChanged()(Code)
Returns true if the URI value for this Asset has changed. true if the URI value for this Assethas changed



moveFile
public static boolean moveFile(File from, File to)(Code)
Moves a file from one location to another.
Parameters:
  from - the current file
Parameters:
  to - the destination file true if this operation was successful, otherwise false



populateFromResultSetRow
protected void populateFromResultSetRow(ResultSet rs, SelectStatement select) throws PopulateException(Code)



publish
public Element publish(Element topEl, HarmoniseOutput output, State state) throws PublishException(Code)



saveCoreData
protected void saveCoreData() throws EditException(Code)



saveNonCoreData
protected void saveNonCoreData() throws EditException(Code)



setContentFile
public void setContentFile(File assetFile) throws PopulateException(Code)
Sets the content file associated with this Asset.
Parameters:
  assetFile - the content file
throws:
  PopulateException - if an error occurs setting the specifiedfile to be the content file for this Asset



setContentType
public void setContentType(String sContentType) throws PopulateException(Code)
Sets the mime type of this Asset.
Parameters:
  sContentType - the mime type
throws:
  PopulateException - if an error occurs setting this mime type value



setIsContentChanged
public void setIsContentChanged(boolean bContentChanged)(Code)
Sets the value of the content changed flag.
Parameters:
  bContentChanged - true to indicate a change in the content, otherwise false



setURI
public void setURI(String sContent)(Code)
Sets the URI for this Asset.
Parameters:
  sContent - the URI



Fields inherited from org.openharmonise.rm.resources.AbstractChildObject
final public static String ARCHIVE_TIMESTAMP_FORMAT(Code)(Java Doc)
final public static String ATTRIB_DEFAULT(Code)(Java Doc)
final public static String ATTRIB_SHOWALL(Code)(Java Doc)
final protected static String CLMN_CHILD_KEY(Code)(Java Doc)
final protected static String CLMN_DATE(Code)(Java Doc)
final protected static String CLMN_DEFAULT_LINK(Code)(Java Doc)
final protected static String CLMN_PARENT_KEY(Code)(Java Doc)
final protected static String CLMN_PATH(Code)(Java Doc)
final protected static String IS_DEFAULT_GROUP(Code)(Java Doc)
final public static String JOIN_TO(Code)(Java Doc)
final public static String TAG_GROUP(Code)(Java Doc)
final public static String TAG_PATH(Code)(Java Doc)
protected boolean m_bIsGroupsPopulated(Code)(Java Doc)
protected static Map m_child_parent_mappings(Code)(Java Doc)
protected int m_defaultGroup(Code)(Java Doc)
protected Map m_groups(Code)(Java Doc)
protected List m_groups_to_save(Code)(Java Doc)
protected String m_sGroupClass(Code)(Java Doc)
protected String m_sPath(Code)(Java Doc)
final public static String separator(Code)(Java Doc)

Methods inherited from org.openharmonise.rm.resources.AbstractChildObject
protected void addColumnsToPopulateQuery(SelectStatement select, boolean bIsHist) throws DataStoreException(Code)(Java Doc)
protected void addDataToSave(InsertStatement insert) throws DataStoreException(Code)(Java Doc)
protected void addParent(AbstractParentObject group) throws PopulateException(Code)(Java Doc)
public Editable archive() throws EditException(Code)(Java Doc)
public Editable changeStatus(Status status) throws EditException(Code)(Java Doc)
public void clear()(Code)(Java Doc)
public Object clone()(Code)(Java Doc)
protected AbstractParentObject createGroupFromPath(String sFullPath) throws EditException(Code)(Java Doc)
protected void delete(boolean bDeleteHist) throws DataStoreException, DataAccessException, EditException, PopulateException(Code)(Java Doc)
protected void fullPopulate() throws PopulateException(Code)(Java Doc)
public List getAllFullPaths() throws DataAccessException(Code)(Java Doc)
public List getAllPaths() throws DataAccessException(Code)(Java Doc)
public static ColumnRef getColumnRef(String sClassname, String sColumn, boolean bHist) throws DataStoreException(Code)(Java Doc)
public String getFullPath() throws DataAccessException(Code)(Java Doc)
public ColumnRef getInstanceColumnRef(String sColumn, boolean bIsHist) throws DataStoreException(Code)(Java Doc)
public static ColumnRef getObjectColumnRef(String sTable, String sColumn) throws DataStoreException(Code)(Java Doc)
protected ColumnRef getParentChildJoinColumnRef(String sCol) throws DataStoreException(Code)(Java Doc)
abstract public String getParentObjectClassName()(Code)(Java Doc)
public static String getParentObjectClassName(String sChildClassname) throws DataAccessException(Code)(Java Doc)
public List getParents() throws DataAccessException(Code)(Java Doc)
public String getPath() throws DataAccessException(Code)(Java Doc)
public AbstractParentObject getRealParent() throws DataAccessException(Code)(Java Doc)
public boolean isChanged() throws DataAccessException(Code)(Java Doc)
public boolean isRealParent(AbstractParentObject obj) throws DataAccessException(Code)(Java Doc)
public void markAsNew() throws PopulateException(Code)(Java Doc)
public void populate(Element xmlElement, State state) throws PopulateException(Code)(Java Doc)
protected void populateFromResultSetRow(ResultSet rs, SelectStatement select) throws PopulateException(Code)(Java Doc)
protected void populateGroupsFromDatabase() throws PopulateException(Code)(Java Doc)
public org.w3c.dom.Element publish(Element topEl, HarmoniseOutput xmlDoc, State state) throws PublishException(Code)(Java Doc)
public Editable reactivate() throws EditException(Code)(Java Doc)
protected void removeParent(AbstractParentObject group) throws PopulateException(Code)(Java Doc)
protected void saveCoreData() throws EditException(Code)(Java Doc)
protected void setRealParent(AbstractParentObject group) throws PopulateException(Code)(Java Doc)
protected void update() throws EditException, DataStoreException(Code)(Java Doc)
protected void updateParents() throws EditException(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.