| org.openharmonise.rm.resources.AbstractChildObject org.openharmonise.rm.resources.content.Asset
All known Subclasses: org.openharmonise.rm.resources.xml.XSLResource,
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
|
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 |
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 |
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 |
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 |
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 |
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 - |
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 Asset has 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 |
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 |
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)
|
|
|