com.dotmarketing.factories
Class WebAssetFactory
java.lang.Object
com.dotmarketing.factories.WebAssetFactory
public class WebAssetFactory
- extends java.lang.Object
- Author:
- maria, david(2005)
|
Method Summary |
static void |
changeAssetMenuOrder(WebAsset asset,
int newValue,
User user)
|
static void |
createAsset(WebAsset webasset,
java.lang.String userId)
|
static void |
createAsset(WebAsset webasset,
java.lang.String userId,
Identifier identifier)
|
static void |
createAsset(WebAsset webasset,
java.lang.String userId,
Identifier identifier,
boolean working)
|
static void |
createAsset(WebAsset webasset,
java.lang.String userId,
Inode parent)
|
static void |
createAsset(WebAsset webasset,
java.lang.String userId,
Inode parent,
Identifier identifier)
|
static void |
createAsset(WebAsset webasset,
java.lang.String userId,
Inode parent,
Identifier identifier,
boolean working)
|
static boolean |
deleteAsset(WebAsset currWebAsset,
java.lang.String userId)
|
static boolean |
deleteAssetVersion(WebAsset currWebAsset)
|
static boolean |
editAsset(WebAsset currWebAsset,
java.lang.String userId)
|
static java.util.List |
getAssetsAndPermissionsPerRoleAndCondition(Host host,
Role[] roles,
java.lang.String condition,
int limit,
int offset,
java.lang.String orderby,
java.lang.Class assetsClass,
java.lang.String tableName)
|
static java.util.List<PermissionAsset> |
getAssetsAndPermissionsPerRoleAndCondition(long hostId,
Role[] roles,
java.lang.String condition,
int limit,
int offset,
java.lang.String orderby,
java.lang.Class assetsClass,
java.lang.String tableName)
|
static java.util.List<PermissionAsset> |
getAssetsAndPermissionsPerRoleAndCondition(Role[] roles,
java.lang.String condition,
int limit,
int offset,
java.lang.String orderby,
java.lang.Class assetsClass,
java.lang.String tableName)
|
static java.util.List |
getAssetsPerConditionWithPermission(Host host,
java.lang.String condition,
java.lang.Class c,
Role[] roles,
int limit,
int offset,
java.lang.String orderby,
long parent)
|
static java.util.List |
getAssetsPerConditionWithPermission(long hostId,
java.lang.String condition,
java.lang.Class c,
Role[] roles,
int limit,
int offset,
java.lang.String orderby,
long parent)
|
static java.util.List |
getAssetsPerConditionWithPermission(java.lang.String condition,
java.lang.Class c,
Role[] roles,
int limit,
int offset,
java.lang.String orderby,
long parent)
|
static java.util.List |
getAssetVersions(WebAsset currWebAsset)
|
static java.util.List |
getAssetVersionsandLive(WebAsset currWebAsset)
|
static java.util.List |
getAssetVersionsandLiveandWorking(WebAsset currWebAsset)
|
static WebAsset |
getBackAssetVersion(WebAsset versionWebAsset)
|
static int |
getCountAssetsPerConditionWithPermission(Host host,
java.lang.String condition,
java.lang.Class c,
Role[] roles)
|
static int |
getCountAssetsPerConditionWithPermission(Host host,
java.lang.String condition,
java.lang.Class c,
Role[] roles,
long parent)
|
static int |
getCountAssetsPerConditionWithPermission(long hostId,
java.lang.String condition,
java.lang.Class c,
Role[] roles)
|
static int |
getCountAssetsPerConditionWithPermission(long hostId,
java.lang.String condition,
java.lang.Class c,
Role[] roles,
long parent)
|
static int |
getCountAssetsPerConditionWithPermission(java.lang.String condition,
java.lang.Class c,
Role[] roles)
|
static int |
getCountAssetsPerConditionWithPermission(java.lang.String condition,
java.lang.Class c,
Role[] roles,
long parent)
|
static WebAsset |
getLiveAsset(WebAsset currWebAsset)
|
static WebAsset |
getParentWebAsset(Inode i)
|
static boolean |
isAbstractAsset(WebAsset asset)
|
static WebAsset |
publishAsset(WebAsset currWebAsset)
This method is odd. |
static void |
renameAsset(WebAsset webasset)
|
static 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. |
static void |
unDeleteAsset(WebAsset currWebAsset)
|
static void |
unLockAsset(WebAsset currWebAsset)
|
static boolean |
unPublishAsset(WebAsset currWebAsset,
java.lang.String userId,
Inode parent)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WebAssetFactory
public WebAssetFactory()
createAsset
public static void createAsset(WebAsset webasset,
java.lang.String userId,
Inode parent)
createAsset
public static void createAsset(WebAsset webasset,
java.lang.String userId)
createAsset
public static void createAsset(WebAsset webasset,
java.lang.String userId,
Inode parent,
Identifier identifier)
createAsset
public static void createAsset(WebAsset webasset,
java.lang.String userId,
Identifier identifier)
createAsset
public static void createAsset(WebAsset webasset,
java.lang.String userId,
Inode parent,
Identifier identifier,
boolean working)
createAsset
public static void createAsset(WebAsset webasset,
java.lang.String userId,
Identifier identifier,
boolean working)
getParentWebAsset
public static WebAsset getParentWebAsset(Inode i)
renameAsset
public static void renameAsset(WebAsset webasset)
editAsset
public static boolean editAsset(WebAsset currWebAsset,
java.lang.String userId)
getBackAssetVersion
public static WebAsset getBackAssetVersion(WebAsset versionWebAsset)
throws java.lang.Exception
- Throws:
java.lang.Exception
publishAsset
public static WebAsset publishAsset(WebAsset currWebAsset)
- This method is odd. You send it an asset, but that may not be the one
that get published. The method will get the identifer of the asset you
send it and find the working version of the asset and make that the live
version.
- Parameters:
currWebAsset - This asset's identifier will be used to find the "working"
asset.
- Returns:
- This method returns the OLD live asset or null. Wierd.
getLiveAsset
public static WebAsset getLiveAsset(WebAsset currWebAsset)
throws java.lang.Exception
- Throws:
java.lang.Exception
deleteAsset
public static boolean deleteAsset(WebAsset currWebAsset,
java.lang.String userId)
deleteAssetVersion
public static boolean deleteAssetVersion(WebAsset currWebAsset)
unLockAsset
public static void unLockAsset(WebAsset currWebAsset)
unDeleteAsset
public static void unDeleteAsset(WebAsset currWebAsset)
unPublishAsset
public static boolean unPublishAsset(WebAsset currWebAsset,
java.lang.String userId,
Inode parent)
getAssetVersions
public static java.util.List getAssetVersions(WebAsset currWebAsset)
getAssetVersionsandLive
public static java.util.List getAssetVersionsandLive(WebAsset currWebAsset)
getAssetVersionsandLiveandWorking
public static java.util.List getAssetVersionsandLiveandWorking(WebAsset currWebAsset)
saveAsset
public static WebAsset saveAsset(WebAsset newWebAsset,
Identifier id)
throws java.lang.Exception
- 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:
java.lang.Exception - The method throw an exception when the new asset identifier
or the working folder cannot be found.
getAssetsPerConditionWithPermission
public static java.util.List getAssetsPerConditionWithPermission(Host host,
java.lang.String condition,
java.lang.Class c,
Role[] roles,
int limit,
int offset,
java.lang.String orderby,
long parent)
getAssetsPerConditionWithPermission
public static java.util.List getAssetsPerConditionWithPermission(long hostId,
java.lang.String condition,
java.lang.Class c,
Role[] roles,
int limit,
int offset,
java.lang.String orderby,
long parent)
getAssetsPerConditionWithPermission
public static java.util.List getAssetsPerConditionWithPermission(java.lang.String condition,
java.lang.Class c,
Role[] roles,
int limit,
int offset,
java.lang.String orderby,
long parent)
getCountAssetsPerConditionWithPermission
public static int getCountAssetsPerConditionWithPermission(Host host,
java.lang.String condition,
java.lang.Class c,
Role[] roles)
getCountAssetsPerConditionWithPermission
public static int getCountAssetsPerConditionWithPermission(long hostId,
java.lang.String condition,
java.lang.Class c,
Role[] roles)
getCountAssetsPerConditionWithPermission
public static int getCountAssetsPerConditionWithPermission(java.lang.String condition,
java.lang.Class c,
Role[] roles)
getCountAssetsPerConditionWithPermission
public static int getCountAssetsPerConditionWithPermission(Host host,
java.lang.String condition,
java.lang.Class c,
Role[] roles,
long parent)
getCountAssetsPerConditionWithPermission
public static int getCountAssetsPerConditionWithPermission(long hostId,
java.lang.String condition,
java.lang.Class c,
Role[] roles,
long parent)
getCountAssetsPerConditionWithPermission
public static int getCountAssetsPerConditionWithPermission(java.lang.String condition,
java.lang.Class c,
Role[] roles,
long parent)
getAssetsAndPermissionsPerRoleAndCondition
public static java.util.List getAssetsAndPermissionsPerRoleAndCondition(Host host,
Role[] roles,
java.lang.String condition,
int limit,
int offset,
java.lang.String orderby,
java.lang.Class assetsClass,
java.lang.String tableName)
getAssetsAndPermissionsPerRoleAndCondition
public static java.util.List<PermissionAsset> getAssetsAndPermissionsPerRoleAndCondition(long hostId,
Role[] roles,
java.lang.String condition,
int limit,
int offset,
java.lang.String orderby,
java.lang.Class assetsClass,
java.lang.String tableName)
getAssetsAndPermissionsPerRoleAndCondition
public static java.util.List<PermissionAsset> getAssetsAndPermissionsPerRoleAndCondition(Role[] roles,
java.lang.String condition,
int limit,
int offset,
java.lang.String orderby,
java.lang.Class assetsClass,
java.lang.String tableName)
isAbstractAsset
public static boolean isAbstractAsset(WebAsset asset)
changeAssetMenuOrder
public static void changeAssetMenuOrder(WebAsset asset,
int newValue,
User user)
throws ActionException
- Throws:
ActionException
Copyright © 2006 Dotmarketing, Inc. All Rights Reserved.