/** * 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); }