Package org.apache.sling.ide.serialization

Examples of org.apache.sling.ide.serialization.SerializationKindManager


            throws SerializationException {

      this.repo = repository;
     
        try {
            this.skm = new SerializationKindManager();
            this.skm.init(repository);
            if (!contentSyncRoot.exists()) {
              throw new IllegalArgumentException("contentSyncRoot does not exist: "+contentSyncRoot);
            }
View Full Code Here


        repository = ServerUtil.getConnectedRepository(server, monitor);

        this.builder = serializationManager.newBuilder(
            repository, ProjectUtil.getSyncDirectoryFile(project));

        SerializationKindManager skm;
       
        try {
            skm = new SerializationKindManager();
            skm.init(repository);
        } catch (RepositoryException e1) {
            throw new InvocationTargetException(e1);
        }

        filter = ProjectUtil.loadFilter(project);
View Full Code Here

    private void normaliseResourceChildren(IFile serializationFile, ResourceProxy resourceProxy, IFolder syncDirectory,
            Repository repository) throws CoreException {

        // TODO - this logic should be moved to the serializationManager
        try {
            SerializationKindManager skm = new SerializationKindManager();
            skm.init(repository);

            String primaryType = (String) resourceProxy.getProperties().get(Repository.JCR_PRIMARY_TYPE);
            List<String> mixinTypesList = getMixinTypes(resourceProxy);
            SerializationKind serializationKind = skm.getSerializationKind(primaryType, mixinTypesList);

            if (serializationKind == SerializationKind.METADATA_FULL) {
                return;
            }
        } catch (RepositoryException e) {
View Full Code Here

  IResource getResource() {
    return resource;
  }
 
  private SerializationKind getSerializationKind(String nodeType) {
        final SerializationKindManager skm = new SerializationKindManager();
        final Repository repo = ServerUtil.getDefaultRepository(getProject());
        if (repo==null) {
            return getFallbackSerializationKind(nodeType);
        }
        try {
            skm.init(repo);
            //TODO: mixins not yet supported
            return skm.getSerializationKind(nodeType, new ArrayList<String>());
        } catch (RepositoryException e) {
            e.printStackTrace();
            return getFallbackSerializationKind(nodeType);
        }
  }
View Full Code Here

TOP

Related Classes of org.apache.sling.ide.serialization.SerializationKindManager

Copyright © 2018 www.massapicom. 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.