public class DriveUtil
extends java.lang.Object
| Constructor and Description |
|---|
DriveUtil() |
| Modifier and Type | Method and Description |
|---|---|
static JSONObject |
buildBasicData(Resource resource,
java.lang.String remoteUser,
AssetManager assetManager) |
static JSONObject |
buildIdentificationData(Resource resource,
AssetManager assetManager) |
static java.lang.String |
buildXMPData(Resource resource) |
static void |
fillRecipeData(SlingHttpServletRequest request,
java.lang.String[] dTypes,
Resource resource,
DriveRenditionPicker picker,
AssetManager assetManager,
JSONObject json) |
static Resource |
getBestFitRendition(int width,
java.util.List<Resource> renditions)
Returns the best fit rendition which is closest to given width and
follows the naming convention cq5dam.[thumbnail|web].width.height.ext
|
static java.lang.String[] |
getDataType(SlingHttpServletRequest request) |
static int |
getHeight(Resource r) |
static JSONObject |
getIconData(Resource resource,
DriveRenditionPicker picker) |
static java.lang.String |
getIdentifier(Node n) |
static int |
getWidth(Resource r)
Returns the width of rendition if follows the naming convention
cq5dam.[thumbnail|web].width.height.ext,else 0
|
static boolean |
isSmartCollection(Resource resource)
Checks if given resource represent a smart collection
|
static boolean |
userOwnsAllLocks(Node node,
java.lang.String userID) |
public static Resource getBestFitRendition(int width, java.util.List<Resource> renditions)
width - The desired width of renditionrenditions - The list of renditionspublic static int getWidth(Resource r)
r - Rendition whose width is requiredpublic static int getHeight(Resource r)
public static java.lang.String getIdentifier(Node n)
public static java.lang.String[] getDataType(SlingHttpServletRequest request)
public static boolean isSmartCollection(Resource resource)
resource - an instance of Resourcetrue if resource represents a smart collection
false if resource does not represents a smart collectionpublic static void fillRecipeData(SlingHttpServletRequest request, java.lang.String[] dTypes, Resource resource, DriveRenditionPicker picker, AssetManager assetManager, JSONObject json) throws JSONException, PathNotFoundException, RepositoryException, XMPException
JSONExceptionPathNotFoundExceptionRepositoryExceptionXMPExceptionpublic static JSONObject buildIdentificationData(Resource resource, AssetManager assetManager)
public static java.lang.String buildXMPData(Resource resource) throws PathNotFoundException, RepositoryException, XMPException
PathNotFoundExceptionRepositoryExceptionXMPExceptionpublic static JSONObject buildBasicData(Resource resource, java.lang.String remoteUser, AssetManager assetManager)
public static JSONObject getIconData(Resource resource, DriveRenditionPicker picker)
public static boolean userOwnsAllLocks(Node node,
java.lang.String userID)
throws RepositoryException
RepositoryException"Copyright © 2010 - 2018 Adobe Systems Incorporated. All Rights Reserved"