Examples of NodeTypeDataValidator


Examples of org.exoplatform.services.jcr.impl.core.nodetype.registration.NodeTypeDataValidator

      this.nodeTypeRepository = nodeTypeRepository;
      this.listeners = Collections.synchronizedMap(new WeakHashMap<NodeTypeManagerListener, NodeTypeManagerListener>());
      this.buildInNodeTypesNames = new HashSet<InternalQName>();

      this.nodeTypeConverter = new NodeTypeConverter(this.locationFactory, this.accessControlPolicy);
      this.nodeTypeDataValidator = new NodeTypeDataValidator(this.locationFactory, this.nodeTypeRepository);
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.core.nodetype.registration.NodeTypeDataValidator

      this.listeners = Collections.synchronizedMap(new WeakHashMap<NodeTypeManagerListener, NodeTypeManagerListener>());
      this.buildInNodeTypesNames = new HashSet<InternalQName>();

      this.nodeTypeConverter = new NodeTypeConverter(this.locationFactory, this.accessControlPolicy);
      this.nodeTypeDataValidator =
         new NodeTypeDataValidator(this.locationFactory, this.nodeTypeRepository, cleanerHolder);
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.core.nodetype.registration.NodeTypeDataValidator

   public List<NodeTypeData> registerNodeTypes(final InputStream is, final int alreadyExistsBehaviour,
      final String contentType) throws RepositoryException
   {

      final NodeTypeConverter nodeTypeConverter = new NodeTypeConverter(this.locationFactory, this.accessControlPolicy);
      final NodeTypeDataValidator nodeTypeDataValidator = new NodeTypeDataValidator(this.nodeTypeRepository);
      NodeTypeDataPersister serializer = null;
      if (contentType.equalsIgnoreCase(TEXT_XML))
      {
         serializer = new XmlNodeTypeDataPersister(nodeTypeConverter, is);
      }
      else if (contentType.equalsIgnoreCase(TEXT_X_JCR_CND))
      {
         throw new RepositoryException("Unsupported content type:" + contentType);
      }
      else
      {
         throw new RepositoryException("Unsupported content type:" + contentType);
      }
      final List<NodeTypeData> nodeTypes = serializer.getAllNodeTypes();

      // validate
      nodeTypeDataValidator.validateNodeType(nodeTypes);

      nodeTypeRepository.registerNodeType(nodeTypes, this, accessControlPolicy, alreadyExistsBehaviour);
      return nodeTypes;
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.core.nodetype.registration.NodeTypeDataValidator

   public List<NodeTypeData> registerNodeTypes(final List<NodeTypeValue> ntvalues, final int alreadyExistsBehaviour)
      throws RepositoryException
   {

      final NodeTypeConverter nodeTypeConverter = new NodeTypeConverter(this.locationFactory, this.accessControlPolicy);
      final NodeTypeDataValidator nodeTypeDataValidator = new NodeTypeDataValidator(this.nodeTypeRepository);
      // convert to Node data.
      final List<NodeTypeData> nodeTypes = nodeTypeConverter.convertFromValueToData(ntvalues);

      // validate
      nodeTypeDataValidator.validateNodeType(nodeTypes);

      nodeTypeRepository.registerNodeType(nodeTypes, this, accessControlPolicy, alreadyExistsBehaviour);

      return nodeTypes;
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.core.nodetype.registration.NodeTypeDataValidator

      this.nodeTypeRepository = nodeTypeRepository;
      this.listeners = Collections.synchronizedMap(new WeakHashMap<NodeTypeManagerListener, NodeTypeManagerListener>());
      this.buildInNodeTypesNames = new HashSet<InternalQName>();

      this.nodeTypeConverter = new NodeTypeConverter(this.locationFactory, this.accessControlPolicy);
      this.nodeTypeDataValidator = new NodeTypeDataValidator(this.locationFactory, this.nodeTypeRepository);
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.core.nodetype.registration.NodeTypeDataValidator

      this.nodeTypeRepository = nodeTypeRepository;
      this.listeners = Collections.synchronizedMap(new WeakHashMap<NodeTypeManagerListener, NodeTypeManagerListener>());
      this.buildInNodeTypesNames = new HashSet<InternalQName>();

      this.nodeTypeConverter = new NodeTypeConverter(this.locationFactory, this.accessControlPolicy);
      this.nodeTypeDataValidator = new NodeTypeDataValidator(this.locationFactory, this.nodeTypeRepository);
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.core.nodetype.registration.NodeTypeDataValidator

      this.nodeTypeRepository = nodeTypeRepository;
      this.listeners = Collections.synchronizedMap(new WeakHashMap<NodeTypeManagerListener, NodeTypeManagerListener>());
      this.buildInNodeTypesNames = new HashSet<InternalQName>();

      this.nodeTypeConverter = new NodeTypeConverter(this.locationFactory, this.accessControlPolicy);
      this.nodeTypeDataValidator = new NodeTypeDataValidator(this.locationFactory, this.nodeTypeRepository);
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.core.nodetype.registration.NodeTypeDataValidator

   public List<NodeTypeData> registerNodeTypes(final InputStream is, final int alreadyExistsBehaviour,
      final String contentType) throws RepositoryException
   {

      final NodeTypeConverter nodeTypeConverter = new NodeTypeConverter(this.locationFactory, this.accessControlPolicy);
      final NodeTypeDataValidator nodeTypeDataValidator = new NodeTypeDataValidator(this.nodeTypeRepository);
      NodeTypeDataPersister serializer = null;
      if (contentType.equalsIgnoreCase(TEXT_XML))
      {
         serializer = new XmlNodeTypeDataPersister(nodeTypeConverter, is);
      }
      else if (contentType.equalsIgnoreCase(TEXT_X_JCR_CND))
      {
         throw new RepositoryException("Unsupported content type:" + contentType);
      }
      else
      {
         throw new RepositoryException("Unsupported content type:" + contentType);
      }
      final List<NodeTypeData> nodeTypes = serializer.getAllNodeTypes();

      // validate
      nodeTypeDataValidator.validateNodeType(nodeTypes);

      nodeTypeRepository.registerNodeType(nodeTypes, this, accessControlPolicy, alreadyExistsBehaviour);
      return nodeTypes;
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.core.nodetype.registration.NodeTypeDataValidator

   public List<NodeTypeData> registerNodeTypes(final List<NodeTypeValue> ntvalues, final int alreadyExistsBehaviour)
      throws RepositoryException
   {

      final NodeTypeConverter nodeTypeConverter = new NodeTypeConverter(this.locationFactory, this.accessControlPolicy);
      final NodeTypeDataValidator nodeTypeDataValidator = new NodeTypeDataValidator(this.nodeTypeRepository);
      // convert to Node data.
      final List<NodeTypeData> nodeTypes = nodeTypeConverter.convertFromValueToData(ntvalues);

      // validate
      nodeTypeDataValidator.validateNodeType(nodeTypes);

      nodeTypeRepository.registerNodeType(nodeTypes, this, accessControlPolicy, alreadyExistsBehaviour);

      return nodeTypes;
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.core.nodetype.registration.NodeTypeDataValidator

      this.listeners = Collections.synchronizedMap(new WeakHashMap<NodeTypeManagerListener, NodeTypeManagerListener>());
      this.buildInNodeTypesNames = new HashSet<InternalQName>();

      this.nodeTypeConverter = new NodeTypeConverter(this.locationFactory, this.accessControlPolicy);
      this.nodeTypeDataValidator =
         new NodeTypeDataValidator(this.locationFactory, this.nodeTypeRepository, cleanerHolder);
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.