|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.arsdigita.cms.publishToFile.Utilities
Experimental Static utility methods used in writing content and templates to the file system.
Constructor Summary | |
Utilities()
|
Method Summary | |
static void |
executeCommand(String cmd)
Excecutes System Command |
static String |
getAssetPath(Asset asset)
This function returns the globally unique path for the asset. |
static String |
getAssetPath(Asset asset,
Folder folder)
Returns asset's path located in folder 'folder'. |
static ContentItem |
getContentItem(BigDecimal itemID)
Retrieve the content_item associated with the itemID. |
static ContentItem |
getContentItemOrNull(BigDecimal itemID)
Retrieve the content_item associated with the itemID. |
static String |
getItemFullPath(ContentItem item)
Returns full path of an item on FS |
static String |
getItemLocation(ContentItem item)
Get item location in the filesystem. |
static Folder |
getLiveTarget(Folder target)
get live version of a folder, creating one if necessary. |
static boolean |
moveItem(Folder dstFolder,
Folder srcFolder,
ContentItem item)
Moves files in File System |
static void |
removeItems(Folder item)
Removes item(s) from File System if 'item' is a Folder object, whole folder is removed if 'item' is a ContentBundle object, all langusge instances related with ContentBundle if 'item' is a language instance, particular file is removed |
static String |
stripJSP(String s)
Strip any ".jsp" extension from a string. |
static void |
updateContentSection(ContentItem item,
ContentSection newSection)
Applies Content Section to an ContentPage, ContentBundle and Folder, if their ContentSections are different. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Utilities()
Method Detail |
public static String getItemLocation(ContentItem item)
item
- Content item
public static boolean moveItem(Folder dstFolder, Folder srcFolder, ContentItem item)
dstFolder
- The destination Folder for Item to be copied, must not be null
public static void removeItems(Folder item)
item
- The ContentItem, which must be removed from File System
public static String getItemFullPath(ContentItem item)
public static void executeCommand(String cmd) throws PublishToFileException
PublishToFileException
public static ContentItem getContentItem(BigDecimal itemID)
itemID
- ID of content item.
public static ContentItem getContentItemOrNull(BigDecimal itemID)
itemID
- ID of content item.
public static String getAssetPath(Asset asset)
public static String getAssetPath(Asset asset, Folder folder)
public static String stripJSP(String s)
s
- input string.
public static Folder getLiveTarget(Folder target)
target
- folder to get live version for.
public static void updateContentSection(ContentItem item, ContentSection newSection)
item
- - ContentItemnewSection
- - new ContentSection
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |