Class DefaultMetaInf

  • All Implemented Interfaces:
    MetaInf

    public class DefaultMetaInf
    extends java.lang.Object
    implements MetaInf
    Abstracts the way of accessing the vault specific meta-info of a checkout.
    • Constructor Detail

      • DefaultMetaInf

        public DefaultMetaInf()
    • Method Detail

      • getPackageFormatVersion

        public int getPackageFormatVersion()
        Returns the package format version of this package. If the package lacks this information, MetaInf.FORMAT_VERSION_2 is returned, since this feature was implemented recently.
        Specified by:
        getPackageFormatVersion in interface MetaInf
        Returns:
        the package format version
        Since:
        2.0
      • load

        public boolean load​(@Nullable
                            java.io.InputStream in,
                            @Nonnull
                            java.lang.String systemId)
                     throws java.io.IOException,
                            ConfigurationException
        Loads a setting based on the name of the system id.

        The specified stream remains open after this method returns.

        Parameters:
        systemId - the system id of the setting to load
        in - the input stream
        Returns:
        true if the setting was loaded.
        Throws:
        java.io.IOException - if an I/O error occurrs
        ConfigurationException - if a configuration error occurrs
        Since:
        3.1.32
      • loadFilter

        public void loadFilter​(@Nonnull
                               java.io.InputStream in,
                               @Nonnull
                               java.lang.String systemId)
                        throws ConfigurationException,
                               java.io.IOException

        The specified stream remains open after this method returns.

        Parameters:
        in -
        systemId -
        Throws:
        ConfigurationException
        java.io.IOException
      • loadConfig

        public void loadConfig​(@Nonnull
                               java.io.InputStream in,
                               @Nonnull
                               java.lang.String systemId)
                        throws ConfigurationException,
                               java.io.IOException

        The specified stream remains open after this method returns.

        Parameters:
        in -
        systemId -
        Throws:
        ConfigurationException
        java.io.IOException
      • loadProperties

        public void loadProperties​(@Nonnull
                                   java.io.InputStream in,
                                   @Nonnull
                                   java.lang.String systemId)
                            throws java.io.IOException

        The specified stream remains open after this method returns.

        Parameters:
        in -
        systemId -
        Throws:
        java.io.IOException
      • loadPrivileges

        public void loadPrivileges​(@Nonnull
                                   java.io.InputStream in,
                                   @Nonnull
                                   java.lang.String systemId)
                            throws java.io.IOException

        The specified stream remains open after this method returns.

        Parameters:
        in -
        systemId -
        Throws:
        java.io.IOException
      • save

        public void save​(@Nonnull
                         java.io.File metaDir)
                  throws java.io.IOException
        Throws:
        java.io.IOException
      • getSettings

        public VaultSettings getSettings()
        Returns the vault settings.
        Specified by:
        getSettings in interface MetaInf
        Returns:
        the vault settings.
      • setSettings

        public void setSettings​(VaultSettings settings)
      • getFilter

        public WorkspaceFilter getFilter()
        Returns the workspace filter.
        Specified by:
        getFilter in interface MetaInf
        Returns:
        the workspace filter.
      • getProperties

        public java.util.Properties getProperties()
        Returns the properties
        Specified by:
        getProperties in interface MetaInf
        Returns:
        the properties
      • setProperties

        public void setProperties​(java.util.Properties properties)
      • getNodeTypes

        public java.util.Collection<NodeTypeSet> getNodeTypes()
        Returns the node types
        Specified by:
        getNodeTypes in interface MetaInf
        Returns:
        the node types
      • getPrivileges

        public PrivilegeDefinitions getPrivileges()
        Returns custom privileges defined in the meta inf.
        Specified by:
        getPrivileges in interface MetaInf
        Returns:
        a collection of custom privileges.
      • setCNDs

        public void setCNDs​(java.util.Collection<NodeTypeSet> cnds)
      • hasDefinition

        public boolean hasDefinition()
        Checks if the meta-inf contains a serialized definition.
        Specified by:
        hasDefinition in interface MetaInf
        Returns:
        true if it contains a serialized definition.
      • setHasDefinition

        public void setHasDefinition​(boolean hasDefinition)