@ProviderType public final class ResourceUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
getPropertyBoolean(org.apache.sling.api.resource.Resource resource,
String namePattern)
Convenience method for getting a single-value boolean property from
a resource.
|
static Calendar |
getPropertyCalendar(org.apache.sling.api.resource.Resource resource,
String namePattern)
Convenience method for getting a single-value Calendar property from
a resource.
|
static Date |
getPropertyDate(org.apache.sling.api.resource.Resource resource,
String namePattern)
Convenience method for getting a single-value Date property from
a resource.
|
static BigDecimal |
getPropertyDecimal(org.apache.sling.api.resource.Resource resource,
String namePattern)
Conventience method for getting a single-value BigDecimal property from a resource.
|
static Double |
getPropertyDouble(org.apache.sling.api.resource.Resource resource,
String namePattern)
Conventience method for getting a single-value Double property from a resource.
|
static Long |
getPropertyLong(org.apache.sling.api.resource.Resource resource,
String namePattern)
Conventience method for getting a single-value Long property from a resource.
|
static org.apache.sling.api.resource.Resource |
getPropertyReference(org.apache.sling.api.resource.Resource resource,
String namePattern)
Get a Resource from a path specified in a resource property.
|
static String |
getPropertyString(org.apache.sling.api.resource.Resource resource,
String namePattern)
Convenience method for getting a single-value String property from a resource.
|
static List<String> |
getPropertyStrings(org.apache.sling.api.resource.Resource resource,
String namePattern)
Convenience method for getting a multi-value String property from a resource.
|
public static boolean getPropertyBoolean(org.apache.sling.api.resource.Resource resource,
String namePattern)
resource - The resource from which to get the property.namePattern - Property name.public static Calendar getPropertyCalendar(org.apache.sling.api.resource.Resource resource, String namePattern)
resource - The resource from which to get the property.namePattern - Property name.public static Date getPropertyDate(org.apache.sling.api.resource.Resource resource, String namePattern)
resource - The resource from which to get the property.namePattern - Property name.public static BigDecimal getPropertyDecimal(org.apache.sling.api.resource.Resource resource, String namePattern)
resource - The resource from which to get the property.namePattern - Property name.public static Double getPropertyDouble(org.apache.sling.api.resource.Resource resource, String namePattern)
resource - The resource from which to get the property.namePattern - Property name.public static Long getPropertyLong(org.apache.sling.api.resource.Resource resource, String namePattern)
resource - The resource from which to get the property.namePattern - Property name.public static org.apache.sling.api.resource.Resource getPropertyReference(org.apache.sling.api.resource.Resource resource,
String namePattern)
resource - The resource from which to get the property.namePattern - Name of the property storing the resource path.public static String getPropertyString(org.apache.sling.api.resource.Resource resource, String namePattern)
resource - The resource from which to get the property.namePattern - Property name.public static List<String> getPropertyStrings(org.apache.sling.api.resource.Resource resource, String namePattern)
resource - The resource from which to get the property.namePattern - Property name.Copyright © 2013–2020 Adobe. All rights reserved.