Class ObjectMapping
- java.lang.Object
-
- com.composum.sling.core.mapping.jcr.ObjectMapping
-
public class ObjectMapping extends Object
Created by rw on 19.05.15.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceObjectMapping.MappingStrategy<T>static classObjectMapping.ObjectFilteraccepts all resources which can be mapped to object by this mapperstatic classObjectMapping.ResourceFilterStrategystatic classObjectMapping.StringFilterStrategy
-
Field Summary
Fields Modifier and Type Field Description protected static List<ResourceFilter>FROM_RESOURCE_FILTERSprotected static List<ObjectMapping.MappingStrategy>FROM_RESOURCE_STRATEGIESstatic ObjectMapping.ObjectFilterOBJECT_FILTERprotected static ResourceFilterRESOURCE_FILTER_FILTERprotected static ObjectMapping.ResourceFilterStrategyRESOURCE_FILTER_STRATEGYprotected static ResourceFilterSTRING_FILTER_FILTERprotected static ObjectMapping.StringFilterStrategySTRING_FILTER_STRATEGYprotected static Map<Class<?>,ObjectMapping.MappingStrategy>TO_RESOURCE_STRATEGIES
-
Constructor Summary
Constructors Constructor Description ObjectMapping()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ObjectfromResource(org.apache.sling.api.resource.Resource resource)static ObjectMapping.MappingStrategygetStrategy(Class<?> objectType)static ObjectMapping.MappingStrategygetStrategy(org.apache.sling.api.resource.Resource resource)static voidtoResource(org.apache.sling.api.resource.Resource resource, Object object)
-
-
-
Field Detail
-
OBJECT_FILTER
public static final ObjectMapping.ObjectFilter OBJECT_FILTER
-
RESOURCE_FILTER_FILTER
protected static final ResourceFilter RESOURCE_FILTER_FILTER
-
STRING_FILTER_FILTER
protected static final ResourceFilter STRING_FILTER_FILTER
-
RESOURCE_FILTER_STRATEGY
protected static final ObjectMapping.ResourceFilterStrategy RESOURCE_FILTER_STRATEGY
-
STRING_FILTER_STRATEGY
protected static final ObjectMapping.StringFilterStrategy STRING_FILTER_STRATEGY
-
FROM_RESOURCE_FILTERS
protected static final List<ResourceFilter> FROM_RESOURCE_FILTERS
-
FROM_RESOURCE_STRATEGIES
protected static final List<ObjectMapping.MappingStrategy> FROM_RESOURCE_STRATEGIES
-
TO_RESOURCE_STRATEGIES
protected static final Map<Class<?>,ObjectMapping.MappingStrategy> TO_RESOURCE_STRATEGIES
-
-
Method Detail
-
fromResource
public static Object fromResource(org.apache.sling.api.resource.Resource resource) throws Exception
- Throws:
Exception
-
toResource
public static void toResource(org.apache.sling.api.resource.Resource resource, Object object) throws javax.jcr.RepositoryException- Throws:
javax.jcr.RepositoryException
-
getStrategy
public static ObjectMapping.MappingStrategy getStrategy(org.apache.sling.api.resource.Resource resource)
-
getStrategy
public static ObjectMapping.MappingStrategy getStrategy(Class<?> objectType)
-
-