Source:
<code>public void initialize(NamespaceRegistry registry, NodeTypeManager nodeTypeManager) throws RepositoryException, IOException { super.initialize(registry, nodeTypeManager); this.factories = getContext().getValueFactories(); properties = new Properties(getContext().getValueFactories()); Map<String, String> parameter = new HashMap<String, String>(); parameter.put(SessionParameter.BINDING_TYPE, BindingType.WEBSERVICES.value()); parameter.put(SessionParameter.WEBSERVICES_ACL_SERVICE, aclService); parameter.put(SessionParameter.WEBSERVICES_DISCOVERY_SERVICE, discoveryService); parameter.put(SessionParameter.WEBSERVICES_MULTIFILING_SERVICE, multifilingService); parameter.put(SessionParameter.WEBSERVICES_NAVIGATION_SERVICE, navigationService); parameter.put(SessionParameter.WEBSERVICES_OBJECT_SERVICE, objectService); parameter.put(SessionParameter.WEBSERVICES_POLICY_SERVICE, policyService); parameter.put(SessionParameter.WEBSERVICES_RELATIONSHIP_SERVICE, relationshipService); parameter.put(SessionParameter.WEBSERVICES_REPOSITORY_SERVICE, repositoryService); parameter.put(SessionParameter.WEBSERVICES_VERSIONING_SERVICE, versioningService); parameter.put(SessionParameter.REPOSITORY_ID, repositoryId); SessionFactoryImpl factory = SessionFactoryImpl.newInstance(); session = factory.createSession(parameter, null, new StandardAuthenticationProvider() { @Override public Element getSOAPHeaders(Object portObject) { return super.getSOAPHeaders(portObject); } }, null); registry.registerNamespace(CmisLexicon.Namespace.PREFIX, CmisLexicon.Namespace.URI); <START> importTypes(session.getTypeDescendants(null, Integer.MAX_VALUE, true), nodeTypeManager); <END> registerRepositoryInfoType(nodeTypeManager); }</code><technical_language>Import types import namespaces</technical_language>

Target:
public void initialize(NamespaceRegistry registry, NodeTypeManager nodeTypeManager) throws RepositoryException, IOException { super.initialize(registry, nodeTypeManager); this.factories = getContext().getValueFactories(); properties = new Properties(getContext().getValueFactories()); Map<String, String> parameter = new HashMap<String, String>(); parameter.put(SessionParameter.BINDING_TYPE, BindingType.WEBSERVICES.value()); parameter.put(SessionParameter.WEBSERVICES_ACL_SERVICE, aclService); parameter.put(SessionParameter.WEBSERVICES_DISCOVERY_SERVICE, discoveryService); parameter.put(SessionParameter.WEBSERVICES_MULTIFILING_SERVICE, multifilingService); parameter.put(SessionParameter.WEBSERVICES_NAVIGATION_SERVICE, navigationService); parameter.put(SessionParameter.WEBSERVICES_OBJECT_SERVICE, objectService); parameter.put(SessionParameter.WEBSERVICES_POLICY_SERVICE, policyService); parameter.put(SessionParameter.WEBSERVICES_RELATIONSHIP_SERVICE, relationshipService); parameter.put(SessionParameter.WEBSERVICES_REPOSITORY_SERVICE, repositoryService); parameter.put(SessionParameter.WEBSERVICES_VERSIONING_SERVICE, versioningService); parameter.put(SessionParameter.REPOSITORY_ID, repositoryId); SessionFactoryImpl factory = SessionFactoryImpl.newInstance(); session = factory.createSession(parameter, null, new StandardAuthenticationProvider() { @Override public Element getSOAPHeaders(Object portObject) { return super.getSOAPHeaders(portObject); } }, null); registry.registerNamespace(CmisLexicon.Namespace.PREFIX, CmisLexicon.Namespace.URI); importTypes(session.getTypeDescendants(null, Integer.MAX_VALUE, true), nodeTypeManager, registry); registerRepositoryInfoType(nodeTypeManager); folderTypes = new HashMap<String, NodeType>(); NodeTypeIterator folders = nodeTypeManager.getNodeType(NodeType.NT_FOLDER).getSubtypes(); while (folders.hasNext()) { NodeType type = (NodeType) folders.next(); folderTypes.put(type.getName(), type); } NodeTypeIterator files = nodeTypeManager.getNodeType(NodeType.NT_FILE).getSubtypes(); fileTypes = new HashMap<String, NodeType>(); while (files.hasNext()) { NodeType type = (NodeType) files.next(); fileTypes.put(type.getName(), type); } }