Class VaultContentXMLContentCreator

  • All Implemented Interfaces:
    org.apache.sling.jcr.contentloader.ContentCreator

    public class VaultContentXMLContentCreator
    extends Object
    implements org.apache.sling.jcr.contentloader.ContentCreator
    ContentCreator substitute to create valid XML files to be packaged into a VaultPackage to be installed later
    • Method Detail

      • createNode

        public void createNode​(String name,
                               String primaryNodeType,
                               String[] mixinNodeTypes)
                        throws javax.jcr.RepositoryException
        Specified by:
        createNode in interface org.apache.sling.jcr.contentloader.ContentCreator
        Throws:
        javax.jcr.RepositoryException
      • getPrimaryNodeName

        @Nullable
        public @Nullable String getPrimaryNodeName()
      • finishNode

        public void finishNode()
        Specified by:
        finishNode in interface org.apache.sling.jcr.contentloader.ContentCreator
      • finish

        public void finish()
                    throws javax.jcr.RepositoryException
        Specified by:
        finish in interface org.apache.sling.jcr.contentloader.ContentCreator
        Throws:
        javax.jcr.RepositoryException
      • createProperty

        public void createProperty​(String name,
                                   int propertyType,
                                   String value)
                            throws javax.jcr.RepositoryException
        Specified by:
        createProperty in interface org.apache.sling.jcr.contentloader.ContentCreator
        Throws:
        javax.jcr.RepositoryException
      • createProperty

        public void createProperty​(String name,
                                   int propertyType,
                                   String[] values)
                            throws javax.jcr.RepositoryException
        Specified by:
        createProperty in interface org.apache.sling.jcr.contentloader.ContentCreator
        Throws:
        javax.jcr.RepositoryException
      • createProperty

        public void createProperty​(String name,
                                   Object value)
                            throws javax.jcr.RepositoryException
        Specified by:
        createProperty in interface org.apache.sling.jcr.contentloader.ContentCreator
        Throws:
        javax.jcr.RepositoryException
      • createProperty

        public void createProperty​(String name,
                                   Object[] values)
                            throws javax.jcr.RepositoryException
        Specified by:
        createProperty in interface org.apache.sling.jcr.contentloader.ContentCreator
        Throws:
        javax.jcr.RepositoryException
      • createFileAndResourceNode

        public void createFileAndResourceNode​(String name,
                                              InputStream data,
                                              String mimeType,
                                              long lastModified)
                                       throws javax.jcr.RepositoryException
        Specified by:
        createFileAndResourceNode in interface org.apache.sling.jcr.contentloader.ContentCreator
        Throws:
        javax.jcr.RepositoryException
      • switchCurrentNode

        public boolean switchCurrentNode​(String subPath,
                                         String newNodeType)
        Specified by:
        switchCurrentNode in interface org.apache.sling.jcr.contentloader.ContentCreator
      • createUser

        public void createUser​(String name,
                               String password,
                               Map<String,​Object> extraProperties)
        Specified by:
        createUser in interface org.apache.sling.jcr.contentloader.ContentCreator
      • createGroup

        public void createGroup​(String name,
                                String[] members,
                                Map<String,​Object> extraProperties)
        Specified by:
        createGroup in interface org.apache.sling.jcr.contentloader.ContentCreator
      • createAce

        public void createAce​(String principal,
                              String[] grantedPrivileges,
                              String[] deniedPrivileges,
                              String order)
        Specified by:
        createAce in interface org.apache.sling.jcr.contentloader.ContentCreator
      • createAce

        public void createAce​(String principalId,
                              String[] grantedPrivilegeNames,
                              String[] deniedPrivilegeNames,
                              String order,
                              Map<String,​javax.jcr.Value> restrictions,
                              Map<String,​javax.jcr.Value[]> mvRestrictions,
                              Set<String> removedRestrictionNames)
        Specified by:
        createAce in interface org.apache.sling.jcr.contentloader.ContentCreator