Class S7SetHelper


  • public class S7SetHelper
    extends java.lang.Object
    Helper methods for S7 Sets
    • Constructor Summary

      Constructors 
      Constructor Description
      S7SetHelper()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static ImageSet createS7ImageSet​(Resource parent, java.lang.String name, java.util.Map<java.lang.String,​java.lang.Object> props)
      Helper method to create S7 ImageSet
      static MediaSet createS7MixedMediaSet​(Resource parent, java.lang.String name, java.util.Map<java.lang.String,​java.lang.Object> props)
      Helper method to create S7 Mixed Media Set
      static SpinSet createS7SpinSet​(Resource parent, java.lang.String name, java.util.Map<java.lang.String,​java.lang.Object> props)
      Helper method to create spin Set
      static SwatchSet createS7SwatchSet​(Resource parent, java.lang.String name, java.util.Map<java.lang.String,​java.lang.Object> props)
      Helper method to create S7 SwatchSet
      static MediaSet createS7VideoSet​(Resource parent, java.lang.String name, java.util.Map<java.lang.String,​java.lang.Object> props)
      Helper method to create S7 VideoSet
      static boolean isS7Set​(Resource resource)
      Checks whether the given resource represent a S7 set or not.
      static boolean isS7Video​(Resource resource)
      Checks if the resource represents an S7 video.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • S7SetHelper

        public S7SetHelper()
    • Method Detail

      • createS7ImageSet

        public static ImageSet createS7ImageSet​(Resource parent,
                                                java.lang.String name,
                                                java.util.Map<java.lang.String,​java.lang.Object> props)
                                         throws PersistenceException
        Helper method to create S7 ImageSet
        Parameters:
        parent - parent Resource where new set to be created
        name - 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,
                                                  java.lang.String name,
                                                  java.util.Map<java.lang.String,​java.lang.Object> props)
                                           throws PersistenceException
        Helper method to create S7 SwatchSet
        Parameters:
        parent - parent Resource where new set to be created
        name - 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,
                                                java.lang.String name,
                                                java.util.Map<java.lang.String,​java.lang.Object> props)
                                         throws PersistenceException
        Helper method to create S7 VideoSet
        Parameters:
        parent - parent Resource where new set to be created
        name - 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,
                                                     java.lang.String name,
                                                     java.util.Map<java.lang.String,​java.lang.Object> props)
                                              throws PersistenceException
        Helper method to create S7 Mixed Media Set
        Parameters:
        parent - parent Resource where new set to be created
        name - 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,
                                              java.lang.String name,
                                              java.util.Map<java.lang.String,​java.lang.Object> props)
                                       throws PersistenceException
        Helper method to create spin Set
        Parameters:
        parent - parent Resource where new set to be created
        name - 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

        public static boolean isS7Set​(Resource resource)
        Checks whether the given resource represent a S7 set or not.
        Parameters:
        resource - resource instance
        Returns:
        true if the resource represent a S7 set false if the resource is not a S7 set
        Throws:
        java.lang.NullPointerException - if resource is null
      • isS7Video

        public static boolean isS7Video​(Resource resource)
        Checks if the resource represents an S7 video.
        Parameters:
        resource - resource instance
        Returns:
        true if the resource represent a S7 set false if the resource is not a S7 set