| | |
| | | /** The list of files to be added to the server schema. */ |
| | | private TreeSet<String> filesToAdd; |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public LocalizableMessage getDisplayName() { |
| | | return INFO_TASK_ADD_SCHEMA_FILE_NAME.get(); |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void initializeTask() |
| | | throws DirectoryException |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | // Get the attribute that specifies which schema file(s) to add. |
| | | Entry taskEntry = getTaskEntry(); |
| | | AttributeType attrType = DirectoryServer.getAttributeType(ATTR_TASK_ADDSCHEMAFILE_FILENAME); |
| | |
| | | throw new DirectoryException(ResultCode.CONSTRAINT_VIOLATION, message); |
| | | } |
| | | |
| | | |
| | | // Get the name(s) of the schema files to add and make sure they exist in |
| | | // the schema directory. |
| | | String schemaInstanceDirectory = |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | // Create a new dummy schema and make sure that we can add the contents of |
| | | // all the schema files into it. Even though this duplicates work we'll |
| | | // have to do later, it will be good to do it now as well so we can reject |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | protected TaskState runTask() |
| | | { |
| | |
| | | { |
| | | try |
| | | { |
| | | List<Modification> modList = SchemaConfigManager.loadSchemaFile(schema, schemaFile); |
| | | List<Modification> modList = SchemaConfigManager.loadSchemaFileReturnModifications(schema, schemaFile); |
| | | for (Modification m : modList) |
| | | { |
| | | Attribute a = m.getAttribute(); |
| | |
| | | } |
| | | } |
| | | } |
| | | |