Interface SetHelper


  • @NotNullApi
    public interface SetHelper
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void clearMembers​(Resource setResource)
      Delete all member relations from the Set.
      Resource createSet​(Resource parent, java.lang.String desiredName, java.lang.String setType)
      Create the new instance of Set and put it into JCR.
      void updateSet​(Resource setResource, @Nullable java.lang.String title, @Nullable java.lang.String description, @Nullable java.lang.String manualThumbnail, @Nullable java.util.Map<java.lang.String,​java.lang.Object> contentProps, @Nullable java.util.Map<java.lang.String,​java.lang.Object> metadataProps, @Nullable java.util.Map<java.lang.String,​java.lang.String> userdataProps, @Nullable java.util.List<java.util.List<java.lang.String>> members, @Nullable java.util.Map<java.lang.String,​java.lang.String> swatches, boolean generateThumbnail)
      Update properties of existing Set in JCR.
    • Method Detail

      • updateSet

        void updateSet​(Resource setResource,
                       @Nullable
                       @Nullable java.lang.String title,
                       @Nullable
                       @Nullable java.lang.String description,
                       @Nullable
                       @Nullable java.lang.String manualThumbnail,
                       @Nullable
                       @Nullable java.util.Map<java.lang.String,​java.lang.Object> contentProps,
                       @Nullable
                       @Nullable java.util.Map<java.lang.String,​java.lang.Object> metadataProps,
                       @Nullable
                       @Nullable java.util.Map<java.lang.String,​java.lang.String> userdataProps,
                       @Nullable
                       @Nullable java.util.List<java.util.List<java.lang.String>> members,
                       @Nullable
                       @Nullable java.util.Map<java.lang.String,​java.lang.String> swatches,
                       boolean generateThumbnail)
        Update properties of existing Set in JCR. Attention: JCR changes are not persisted yet, you must save explicitly after calling this method!
        Parameters:
        setResource - Resource pointing to existing Set to update
        title - (optional) user-facing title of the new Set, skipped updating if null
        description - (optional) free-text description of the Set, skipped updating if null
        manualThumbnail - (optional) JCR path for Asset used as thumbnail for the Set, skipped updating if null
        contentProps - (optional) properties to add to "jcr:content" subnode, skipped if null
        metadataProps - (optional) properties to add to "jcr:content/metadata" subnode, skipped if null
        userdataProps - (optional) properties to add to "jcr:content/userdata" subnode, skipped if null
        members - (optional) 2-D list of JCR paths of Set members to add, skipped updating if null; Single-dimensional Set types (eg ImageSet) uses the first row only. Existing members array is not deleted: if you need the full replace of members array, you have to clear members with clearMembers(Resource) before calling this method, and set non-null "members" param (can be empty List for empty Set)
        swatches - (optional) contains the map of swatch images associated to Set members: key = path of member Asset, value = path of Asset used as swatch for that member
        generateThumbnail - after updating, generate thumbnail Rendition from first few members, or from user- selected Asset in manualThumbnail property.
      • clearMembers

        void clearMembers​(Resource setResource)
        Delete all member relations from the Set.
        Parameters:
        setResource - Resource pointing to existing Set to update