Class DefaultMetaInf
java.lang.Object
org.apache.jackrabbit.vault.fs.config.DefaultMetaInf
- All Implemented Interfaces:
MetaInf
Abstracts the way of accessing the vault specific meta-info of a checkout.
-
Field Summary
Fields inherited from interface org.apache.jackrabbit.vault.fs.config.MetaInf
CREATED, CREATED_BY, FORMAT_VERSION_1, FORMAT_VERSION_2, GENERATOR, PACKAGE_FORMAT_VERSION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the vault config.Returns the workspace filter.Returns the node types.intReturns the package format version of this package.Returns the package properties.Returns custom privileges defined in the meta inf.Returns the properties.Returns the vault settings.booleanChecks if the meta-inf contains a serialized definition.booleanload(@Nullable InputStream in, @NotNull String systemId) Loads a setting based on the name of the system id.voidloadConfig(@NotNull InputStream in, @NotNull String systemId) The specified stream remains open after this method returns.voidloadFilter(@NotNull InputStream in, @NotNull String systemId) The specified stream remains open after this method returns.voidloadPrivileges(@NotNull InputStream in, @NotNull String systemId) The specified stream remains open after this method returns.voidloadProperties(@NotNull InputStream in, @NotNull String systemId) The specified stream remains open after this method returns.voidloadSettings(@NotNull InputStream in, @NotNull String systemId) voidvoidsetCNDs(Collection<NodeTypeSet> cnds) voidsetConfig(VaultFsConfig config) voidsetFilter(WorkspaceFilter filter) voidsetHasDefinition(boolean hasDefinition) voidsetProperties(Properties properties) voidsetSettings(VaultSettings settings)
-
Constructor Details
-
DefaultMetaInf
public DefaultMetaInf()
-
-
Method Details
-
getPackageFormatVersion
public int getPackageFormatVersion()Returns the package format version of this package. If the package lacks this information,MetaInf.FORMAT_VERSION_2is returned, since this feature was implemented recently.- Specified by:
getPackageFormatVersionin interfaceMetaInf- Returns:
- the package format version
- Since:
- 2.0
-
load
public boolean load(@Nullable @Nullable InputStream in, @NotNull @NotNull String systemId) throws IOException, ConfigurationException Loads a setting based on the name of the system id.The specified stream remains open after this method returns.
- Parameters:
in- the input streamsystemId- the system id of the setting to load- Returns:
trueif the setting was loaded.- Throws:
IOException- if an I/O error occurrsConfigurationException- if a configuration error occurrs- Since:
- 3.1.32
-
loadFilter
public void loadFilter(@NotNull @NotNull InputStream in, @NotNull @NotNull String systemId) throws ConfigurationException, IOException The specified stream remains open after this method returns.
- Parameters:
in-systemId-- Throws:
ConfigurationExceptionIOException
-
loadConfig
public void loadConfig(@NotNull @NotNull InputStream in, @NotNull @NotNull String systemId) throws ConfigurationException, IOException The specified stream remains open after this method returns.
- Parameters:
in-systemId-- Throws:
ConfigurationExceptionIOException
-
loadSettings
public void loadSettings(@NotNull @NotNull InputStream in, @NotNull @NotNull String systemId) throws ConfigurationException, IOException - Throws:
ConfigurationExceptionIOException
-
loadProperties
public void loadProperties(@NotNull @NotNull InputStream in, @NotNull @NotNull String systemId) throws IOException The specified stream remains open after this method returns.
- Parameters:
in-systemId-- Throws:
IOException
-
loadPrivileges
public void loadPrivileges(@NotNull @NotNull InputStream in, @NotNull @NotNull String systemId) throws IOException The specified stream remains open after this method returns.
- Parameters:
in-systemId-- Throws:
IOException
-
save
- Throws:
IOException
-
getSettings
Returns the vault settings.- Specified by:
getSettingsin interfaceMetaInf- Returns:
- the vault settings
-
setSettings
-
getFilter
Returns the workspace filter. -
setFilter
-
getConfig
Returns the vault config. -
setConfig
-
getProperties
Returns the properties.- Specified by:
getPropertiesin interfaceMetaInf- Returns:
- the properties
-
setProperties
-
getNodeTypes
Returns the node types.- Specified by:
getNodeTypesin interfaceMetaInf- Returns:
- the node types
-
getPrivileges
Returns custom privileges defined in the meta inf.- Specified by:
getPrivilegesin interfaceMetaInf- Returns:
- a collection of custom privileges
-
setCNDs
-
hasDefinition
public boolean hasDefinition()Checks if the meta-inf contains a serialized definition.- Specified by:
hasDefinitionin interfaceMetaInf- Returns:
trueif it contains a serialized definition
-
setHasDefinition
public void setHasDefinition(boolean hasDefinition) -
getPackageProperties
Description copied from interface:MetaInfReturns the package properties.- Specified by:
getPackagePropertiesin interfaceMetaInf- Returns:
- the package properties
-