| java.lang.Object org.ofbiz.content.data.DataResourceWorker
DataResourceWorker | public class DataResourceWorker (Code) | | DataResourceWorker Class
|
Method Summary | |
public static byte[] | acquireImage(GenericDelegator delegator, String dataResourceId) Gets image data from ImageDataResource and returns it as a byte array. | public static byte[] | acquireImage(GenericDelegator delegator, GenericValue dataResource) | 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 Map | callDataResourcePermissionCheckResult(GenericDelegator delegator, LocalDispatcher dispatcher, Map context) callDataResourcePermissionCheck Formats data for a call to the checkContentPermission service. | public static ByteWrapper | getContentAsByteWrapper(GenericDelegator delegator, String dataResourceId, String https, String webSiteId, Locale locale, String rootDir) | public static File | getContentFile(String dataResourceTypeId, String objectInfo, String contextRoot) | 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 | getDataResourceContentUploadPath() | public static String | getDataResourceMimeType(GenericDelegator delegator, String dataResourceId, GenericValue view) | public static Map | getDataResourceStream(GenericValue dataResource, String https, String webSiteId, Locale locale, String contextRoot, boolean cache) | public static String | getDataResourceText(GenericValue dataResource, String mimeTypeId, Locale locale, Map context, GenericDelegator delegator, boolean cache) | 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 | getImageType(GenericDelegator delegator, GenericValue dataResource) | public static String | getMimeType(GenericValue dataResource) | public static String | getMimeTypeFromImageFileName(String imageFileName) | public static String | renderDataResourceAsText(GenericDelegator delegator, String dataResourceId, Map templateContext, Locale locale, String targetMimeTypeId, boolean cache) | public static void | renderDataResourceAsText(GenericDelegator delegator, String dataResourceId, Writer out, Map templateContext, Locale locale, String targetMimeTypeId, boolean cache) | 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 targetMimeTypeId) | 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 targetMimeTypeId) | public static void | renderFile(String dataResourceTypeId, String objectInfo, String rootDir, Writer out) | public static String | renderMimeTypeTemplate(GenericValue mimeTypeTemplate, Map context) | public static void | streamDataResource(OutputStream os, GenericDelegator delegator, String dataResourceId, String https, String webSiteId, Locale locale, String rootDir) | 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 templateContext, GenericDelegator delegator, Writer out, boolean cache) | public static void | writeDataResourceText(GenericValue dataResource, String mimeTypeId, Locale locale, Map context, GenericDelegator delegator, Writer out) | public static void | writeDataResourceTextCache(GenericValue dataResource, String mimeTypeId, Locale locale, Map context, GenericDelegator delegator, Writer outWriter) | public static void | writeText(GenericValue dataResource, String textData, Map context, String targetMimeTypeId, Locale locale, Writer out) |
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.
|
callDataResourcePermissionCheckResult | public static Map callDataResourcePermissionCheckResult(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 anindented select list. |
getDataResourceContentUploadPath | public static String getDataResourceContentUploadPath()(Code) | | |
getDataResourceStream | public static Map getDataResourceStream(GenericValue dataResource, String https, String webSiteId, Locale locale, String contextRoot, boolean cache) throws IOException, GeneralException(Code) | | getDataResourceStream - gets an InputStream and Content-Length of a DataResource
Parameters: dataResource - Parameters: https - Parameters: webSiteId - Parameters: locale - Parameters: contextRoot - Map containing 'stream': the InputStream and 'length' a Long containing the content-length throws: IOException - throws: GeneralException - |
getMimeTypeFromImageFileName | public static String getMimeTypeFromImageFileName(String imageFileName)(Code) | | |
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.
|
|
|