Package com.day.cq.dam.commons.util
Class S7SetHelper
java.lang.Object
com.day.cq.dam.commons.util.S7SetHelper
Helper methods for S7 Sets
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ImageSet
Helper method to create S7ImageSet
static MediaSet
Helper method to create S7 Mixed Media Setstatic SpinSet
Helper method to create spin Setstatic SwatchSet
Helper method to create S7SwatchSet
static MediaSet
Helper method to create S7 VideoSetstatic boolean
Checks whether the given resource represent a S7 set or not.static boolean
Checks if the resource represents an S7 video.
-
Constructor Details
-
S7SetHelper
public S7SetHelper()
-
-
Method Details
-
createS7ImageSet
public static ImageSet createS7ImageSet(Resource parent, String name, Map<String, Object> props) throws PersistenceExceptionHelper method to create S7ImageSet
- Parameters:
parent
- parentResource
where new set to be createdname
- name of the set to be created.props
- additional properties to be saved i.e. jcr:title- Returns:
- an instance of
ImageSet
- Throws:
PersistenceException
- if there is any issue in creating the set. IllegalArgumentException if the parent resource is null or name is null
-
createS7SwatchSet
public static SwatchSet createS7SwatchSet(Resource parent, String name, Map<String, Object> props) throws PersistenceExceptionHelper method to create S7SwatchSet
- Parameters:
parent
- parentResource
where new set to be createdname
- name of the set to be created.props
- additional properties to be saved i.e. jcr:title- Returns:
- an instance of
SwatchSet
- Throws:
PersistenceException
- if there is any issue in creating the set. IllegalArgumentException if the parent resource is null
-
createS7VideoSet
public static MediaSet createS7VideoSet(Resource parent, String name, Map<String, Object> props) throws PersistenceExceptionHelper method to create S7 VideoSet- Parameters:
parent
- parentResource
where new set to be createdname
- name of the set to be created.props
- additional properties to be saved i.e. jcr:title- Returns:
- an instance of
MediaSet
- Throws:
PersistenceException
- if there is any issue in creating the set. IllegalArgumentException if the parent resource is null
-
createS7MixedMediaSet
public static MediaSet createS7MixedMediaSet(Resource parent, String name, Map<String, Object> props) throws PersistenceExceptionHelper method to create S7 Mixed Media Set- Parameters:
parent
- parentResource
where new set to be createdname
- name of the set to be created.props
- additional properties to be saved i.e. jcr:title- Returns:
- an instance of
MediaSet
- Throws:
PersistenceException
- if there is any issue in creating the set. IllegalArgumentException if the parent resource is null
-
createS7SpinSet
public static SpinSet createS7SpinSet(Resource parent, String name, Map<String, Object> props) throws PersistenceExceptionHelper method to create spin Set- Parameters:
parent
- parentResource
where new set to be createdname
- name of the set to be created.props
- additional properties to be saved i.e. jcr:title- Returns:
- an instance of
MediaSet
- Throws:
PersistenceException
- if there is any issue in creating the set. IllegalArgumentException if the parent resource is null
-
isS7Set
Checks whether the given resource represent a S7 set or not.- Parameters:
resource
- resource instance- Returns:
true
if the resource represent a S7 setfalse
if the resource is not a S7 set- Throws:
NullPointerException
- if resource is null
-
isS7Video
Checks if the resource represents an S7 video.- Parameters:
resource
- resource instance- Returns:
true
if the resource represent a S7 setfalse
if the resource is not a S7 set
-