com.dotmarketing.business
Class BaseWebAssetAPI

java.lang.Object
  extended by com.dotmarketing.business.BaseInodeAPI
      extended by com.dotmarketing.business.BaseWebAssetAPI
Direct Known Subclasses:
ContainerAPIImpl, FileAPIImpl, HTMLPageAPIImpl, MenuLinkAPIImpl, TemplateAPIImpl

public abstract class BaseWebAssetAPI
extends BaseInodeAPI

Author:
jtesser All methods in the BaseWebAssetAPI should be protected or private. The BaseWebAssetAPI is intended to be extended by other APIs for WebAsset Objects. This api will eventually fade out when all web assets move to content

Constructor Summary
BaseWebAssetAPI()
           
 
Method Summary
protected  void createAsset(WebAsset webasset, java.lang.String userId)
           
protected  void createAsset(WebAsset webasset, java.lang.String userId, Identifier identifier, boolean working)
           
protected  void createAsset(WebAsset webasset, java.lang.String userId, Inode parent)
           
protected  void createAsset(WebAsset webasset, java.lang.String userId, Inode parent, Identifier identifier, boolean working)
           
static boolean deleteAsset(WebAsset currWebAsset)
          This method totally removes an asset from the cms
protected  java.util.List findLiveChildren(Inode parent, WebAsset webAsset)
          Deprecated.  
 int getCountAssetsAndPermissionsPerRoleAndConditionWithParent(java.lang.String condition, java.lang.Class assetsClass, java.lang.String parentId, boolean showDeleted, com.liferay.portal.model.User user)
           
 int getCountAssetsAndPermissionsPerRoleAndConditionWithParent(java.lang.String hostId, java.lang.String condition, java.lang.Class assetsClass, java.lang.String parentId, boolean showDeleted, com.liferay.portal.model.User user)
           
 int getCountAssetsPerConditionWithPermission(Host host, java.lang.String condition, java.lang.Class c, java.lang.String parent, com.liferay.portal.model.User user)
           
 int getCountAssetsPerConditionWithPermission(Host host, java.lang.String condition, java.lang.Class c, com.liferay.portal.model.User user)
           
 int getCountAssetsPerConditionWithPermission(java.lang.String condition, java.lang.Class c, java.lang.String parent, com.liferay.portal.model.User user)
           
 int getCountAssetsPerConditionWithPermission(java.lang.String condition, java.lang.Class c, com.liferay.portal.model.User user)
           
 int getCountAssetsPerConditionWithPermission(java.lang.String hostId, java.lang.String condition, java.lang.Class c, java.lang.String parent, com.liferay.portal.model.User user)
           
 int getCountAssetsPerConditionWithPermission(java.lang.String hostId, java.lang.String condition, java.lang.Class c, com.liferay.portal.model.User user)
           
protected  boolean isAbstractAsset(WebAsset asset)
           
protected abstract  void save(WebAsset currWebAsset)
          Save the asset.
protected  WebAsset saveAsset(WebAsset newWebAsset, Identifier id)
          This method save the new asset as the new working version and change the current working as an old version.
protected  void unLockAsset(WebAsset currWebAsset)
           
 
Methods inherited from class com.dotmarketing.business.BaseInodeAPI
getChildrenClassByCondition, saveInode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseWebAssetAPI

public BaseWebAssetAPI()
Method Detail

findLiveChildren

protected java.util.List findLiveChildren(Inode parent,
                                          WebAsset webAsset)
Deprecated. 

PLEASE REMOVE ME!!!!!!

Parameters:
parent -
webAsset - The type of WebAsset children to look for
Returns:

save

protected abstract void save(WebAsset currWebAsset)
                      throws DotDataException
Save the asset.

Parameters:
currWebAsset -
Throws:
DotDataException

unLockAsset

protected void unLockAsset(WebAsset currWebAsset)
                    throws DotDataException
Throws:
DotDataException

createAsset

protected void createAsset(WebAsset webasset,
                           java.lang.String userId)
                    throws DotDataException
Throws:
DotDataException

createAsset

protected void createAsset(WebAsset webasset,
                           java.lang.String userId,
                           Inode parent)
                    throws DotDataException
Throws:
DotDataException

createAsset

protected void createAsset(WebAsset webasset,
                           java.lang.String userId,
                           Identifier identifier,
                           boolean working)
                    throws DotDataException
Throws:
DotDataException

createAsset

protected void createAsset(WebAsset webasset,
                           java.lang.String userId,
                           Inode parent,
                           Identifier identifier,
                           boolean working)
                    throws DotDataException
Throws:
DotDataException

saveAsset

protected WebAsset saveAsset(WebAsset newWebAsset,
                             Identifier id)
                      throws DotDataException
This method save the new asset as the new working version and change the current working as an old version.

Parameters:
newWebAsset - New webasset version to be converted as the working asset.
Returns:
The current working webasset (The new version), after the method execution is must use this class as the working asset instead the class you give as parameter.
Throws:
DotDataException - The method throw an exception when the new asset identifier or the working folder cannot be found.

isAbstractAsset

protected boolean isAbstractAsset(WebAsset asset)

deleteAsset

public static boolean deleteAsset(WebAsset currWebAsset)
This method totally removes an asset from the cms

Parameters:
currWebAsset -
user - If the user is passed (not null) the system will check for write permission of the user in the asset
respectFrontendRoles -
Returns:
true if the asset was sucessfully removed
Throws:
java.lang.Exception

getCountAssetsAndPermissionsPerRoleAndConditionWithParent

public int getCountAssetsAndPermissionsPerRoleAndConditionWithParent(java.lang.String condition,
                                                                     java.lang.Class assetsClass,
                                                                     java.lang.String parentId,
                                                                     boolean showDeleted,
                                                                     com.liferay.portal.model.User user)

getCountAssetsPerConditionWithPermission

public int getCountAssetsPerConditionWithPermission(java.lang.String condition,
                                                    java.lang.Class c,
                                                    com.liferay.portal.model.User user)

getCountAssetsPerConditionWithPermission

public int getCountAssetsPerConditionWithPermission(java.lang.String condition,
                                                    java.lang.Class c,
                                                    java.lang.String parent,
                                                    com.liferay.portal.model.User user)

getCountAssetsAndPermissionsPerRoleAndConditionWithParent

public int getCountAssetsAndPermissionsPerRoleAndConditionWithParent(java.lang.String hostId,
                                                                     java.lang.String condition,
                                                                     java.lang.Class assetsClass,
                                                                     java.lang.String parentId,
                                                                     boolean showDeleted,
                                                                     com.liferay.portal.model.User user)

getCountAssetsPerConditionWithPermission

public int getCountAssetsPerConditionWithPermission(Host host,
                                                    java.lang.String condition,
                                                    java.lang.Class c,
                                                    com.liferay.portal.model.User user)

getCountAssetsPerConditionWithPermission

public int getCountAssetsPerConditionWithPermission(java.lang.String hostId,
                                                    java.lang.String condition,
                                                    java.lang.Class c,
                                                    com.liferay.portal.model.User user)

getCountAssetsPerConditionWithPermission

public int getCountAssetsPerConditionWithPermission(Host host,
                                                    java.lang.String condition,
                                                    java.lang.Class c,
                                                    java.lang.String parent,
                                                    com.liferay.portal.model.User user)

getCountAssetsPerConditionWithPermission

public int getCountAssetsPerConditionWithPermission(java.lang.String hostId,
                                                    java.lang.String condition,
                                                    java.lang.Class c,
                                                    java.lang.String parent,
                                                    com.liferay.portal.model.User user)


Copyright © 2010 dotCMS Inc. All Rights Reserved.