public class DriveUtil extends Object
Constructor and Description |
---|
DriveUtil() |
Modifier and Type | Method and Description |
---|---|
static JSONObject |
buildBasicData(Resource resource,
String remoteUser,
AssetManager assetManager) |
static JSONObject |
buildIdentificationData(Resource resource,
AssetManager assetManager) |
static String |
buildXMPData(Resource resource) |
static void |
fillRecipeData(SlingHttpServletRequest request,
String[] dTypes,
Resource resource,
DriveRenditionPicker picker,
AssetManager assetManager,
JSONObject json) |
static Resource |
getBestFitRendition(int width,
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 String[] |
getDataType(SlingHttpServletRequest request) |
static int |
getHeight(Resource r) |
static JSONObject |
getIconData(Resource resource,
DriveRenditionPicker picker) |
static 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,
String userID) |
public static Resource getBestFitRendition(int width, 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 String getIdentifier(Node n)
public static String[] getDataType(SlingHttpServletRequest request)
public static boolean isSmartCollection(Resource resource)
resource
- an instance of Resource
true
if resource
represents a smart collection
false
if resource
does not represents a smart collectionpublic static void fillRecipeData(SlingHttpServletRequest request, String[] dTypes, Resource resource, DriveRenditionPicker picker, AssetManager assetManager, JSONObject json) throws JSONException, PathNotFoundException, RepositoryException, XMPException
JSONException
PathNotFoundException
RepositoryException
XMPException
public static JSONObject buildIdentificationData(Resource resource, AssetManager assetManager)
public static String buildXMPData(Resource resource) throws PathNotFoundException, RepositoryException, XMPException
PathNotFoundException
RepositoryException
XMPException
public static JSONObject buildBasicData(Resource resource, String remoteUser, AssetManager assetManager)
public static JSONObject getIconData(Resource resource, DriveRenditionPicker picker)
public static boolean userOwnsAllLocks(Node node, String userID) throws RepositoryException
RepositoryException
"Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"