| java.lang.Object org.ofbiz.content.data.DataResourceWorker
DataResourceWorker | public class DataResourceWorker (Code) | | DataResourceWorker Class
author: Al Byers author: David E. Jones version: $Revision: 1.17 $ since: 3.0 |
Method Summary | |
public static byte[] | acquireImage(GenericDelegator delegator, String dataResourceId) Gets image data from ImageDataResource and returns it as a byte array. | public static void | buildList(HashMap nd, List lst, int depth) Takes a DataCategory structure and builds a list of maps, one value (id) is the dataCategoryId value and the other is an indented string suitable for
use in a drop-down pick list. | public static String | buildRequestPrefix(GenericDelegator delegator, Locale locale, String webSiteId, String https) | public static String | callDataResourcePermissionCheck(GenericDelegator delegator, LocalDispatcher dispatcher, Map context) callDataResourcePermissionCheck Formats data for a call to the checkContentPermission service. | public static void | getDataCategoryAncestry(GenericDelegator delegator, String dataCategoryId, List categoryTypeIds) Finds the parents of DataCategory entity and puts them in a list, the start entity at the top. | public static String | getDataCategoryMap(GenericDelegator delegator, int depth, Map categoryNode, List categoryTypeIds, boolean getAll) Traverses the DataCategory parent/child structure and put it in categoryNode. | public static String | getDataResourceText(GenericValue dataResource, String mimeTypeId, Locale locale, Map context, GenericDelegator delegator) | public static String | getDataResourceTextCache(GenericValue dataResource, String mimeTypeId, Locale locale, Map context, GenericDelegator delegator) | public static String | getImageType(GenericDelegator delegator, String dataResourceId) Returns the image type. | public static String | renderDataResourceAsText(GenericDelegator delegator, String dataResourceId, Map templateContext, GenericValue view, Locale locale, String mimeTypeId) | public static void | renderDataResourceAsText(GenericDelegator delegator, String dataResourceId, Writer out, Map templateContext, GenericValue view, Locale locale, String mimeTypeId) | public static String | renderDataResourceAsTextCache(GenericDelegator delegator, String dataResourceId, Map templateContext, GenericValue view, Locale locale, String mimeTypeId) | public static void | renderDataResourceAsTextCache(GenericDelegator delegator, String dataResourceId, Writer out, Map templateContext, GenericValue view, Locale locale, String mimeTypeId) | public static void | renderFile(String dataResourceTypeId, String objectInfo, String rootDir, Writer out) | public static String | uploadAndStoreImage(HttpServletRequest request, String idField, String uploadField) Uploads image data from a form and stores it in ImageDataResource. | public static void | writeDataResourceText(GenericValue dataResource, String mimeTypeId, Locale locale, Map context, GenericDelegator delegator, Writer outWriter) | public static void | writeDataResourceTextCache(GenericValue dataResource, String mimeTypeId, Locale locale, Map context, GenericDelegator delegator, Writer outWriter) |
buildList | public static void buildList(HashMap nd, List lst, int depth)(Code) | | Takes a DataCategory structure and builds a list of maps, one value (id) is the dataCategoryId value and the other is an indented string suitable for
use in a drop-down pick list.
|
callDataResourcePermissionCheck | public static String callDataResourcePermissionCheck(GenericDelegator delegator, LocalDispatcher dispatcher, Map context)(Code) | | callDataResourcePermissionCheck Formats data for a call to the checkContentPermission service.
|
getDataCategoryMap | public static String getDataCategoryMap(GenericDelegator delegator, int depth, Map categoryNode, List categoryTypeIds, boolean getAll) throws GenericEntityException(Code) | | Traverses the DataCategory parent/child structure and put it in categoryNode. Returns non-null error string if there is an error.
Parameters: depth - The place on the categoryTypesIds to start collecting. Parameters: getAll - Indicates that all descendants are to be gotten. Used as "true" to populate an indented select list. |
uploadAndStoreImage | public static String uploadAndStoreImage(HttpServletRequest request, String idField, String uploadField)(Code) | | Uploads image data from a form and stores it in ImageDataResource. Expects key data in a field identitified by the "idField" value and the binary data
to be in a field id'd by uploadField.
|
|
|