/** * Parses the given XML document and returns the DOM root element. * A custom entity resolver is used to make the included configuration * file DTD available using the specified public identifiers. * This implementation does not validate the XML. * * @see ConfigurationEntityResolver * @param xml xml document * @return root element * @throws ConfigurationException if the configuration document could * not be read or parsed */ protected Element parseXML(InputSource xml) throws ConfigurationException { return parseXML(xml, false); }
/** * Parses the given XML document and returns the DOM root element. * A custom entity resolver is used to make the included configuration * file DTD available using the specified public identifiers. * This implementation does not validate the XML. * * @see ConfigurationEntityResolver * @param xml xml document * @return root element * @throws ConfigurationException if the configuration document could * not be read or parsed */ protected Element parseXML(InputSource xml) throws ConfigurationException { return parseXML(xml, false); }
/** * Creates a new workspace configuration with the specified name. This * method uses the provided workspace <code>template</code> to create the * repository config instead of the template that is present in the * repository configuration. * <p> * This method creates a workspace configuration subdirectory, * copies the workspace configuration template into it, and finally * adds the created workspace configuration to the repository. * The initialized workspace configuration object is returned to * the caller. * * @param name workspace name * @param template the workspace template * @return created workspace configuration * @throws ConfigurationException if creating the workspace configuration * failed */ public WorkspaceConfig createWorkspaceConfig(String name, InputSource template) throws ConfigurationException { ConfigurationParser parser = new ConfigurationParser(new Properties()); Element workspaceTemplate = parser.parseXML(template); return internalCreateWorkspaceConfig(name, workspaceTemplate, null); }
/** * Creates a new workspace configuration with the specified name. This * method uses the provided workspace <code>template</code> to create the * repository config instead of the template that is present in the * repository configuration. * <p> * This method creates a workspace configuration subdirectory, * copies the workspace configuration template into it, and finally * adds the created workspace configuration to the repository. * The initialized workspace configuration object is returned to * the caller. * * @param name workspace name * @param template the workspace template * @return created workspace configuration * @throws ConfigurationException if creating the workspace configuration * failed */ public WorkspaceConfig createWorkspaceConfig(String name, InputSource template) throws ConfigurationException { ConfigurationParser parser = new ConfigurationParser(new Properties()); Element workspaceTemplate = parser.parseXML(template); return internalCreateWorkspaceConfig(name, workspaceTemplate, null); }