Package org.apache.sling.ide.serialization

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


            String fileOrFolderPathHint = calculateFileOrFolderPathHint(chain);

            String nameHint = PlatformNameFormat.getPlatformName(aggregate.getName());

            SerializationKind serializationKind = getSerializationKind(aggregate);

            if (resource.getPath().equals("/") || serializationKind == SerializationKind.METADATA_PARTIAL
                    || serializationKind == SerializationKind.FILE || serializationKind == SerializationKind.FOLDER) {
                nameHint = Constants.DOT_CONTENT_XML;
            } else if (serializationKind == SerializationKind.METADATA_FULL) {
View Full Code Here


                out.append("/");
                out.append(PlatformNameFormat.getPlatformPath(cur.getRelPath()));
            }

            if (needsDir(cur)) {
                SerializationKind serializationKind = getSerializationKind(cur);

                if (serializationKind == SerializationKind.FILE) {
                    out.append(".dir");
                }
View Full Code Here

        }
  }
 
  public void createChild(final String childNodeName, final String childNodeType) {
      String thisNodeType = getPrimaryType();
      final SerializationKind parentSk = getSerializationKind(thisNodeType);
        final SerializationKind childSk = getSerializationKind(childNodeType);

        final SerializationManager serializationManager = Activator.getDefault().getSerializationManager();
     
      if (parentSk==SerializationKind.METADATA_FULL) {
          createDomChild(childNodeName, childNodeType);
View Full Code Here

    private ResourceProxy buildResourceProxyForPlainFileOrFolder(IResource changedResource, IFolder syncDirectory,
            Repository repository)
            throws CoreException, IOException {

        SerializationKind serializationKind;
        String fallbackNodeType;
        if (changedResource.getType() == IResource.FILE) {
            serializationKind = SerializationKind.FILE;
            fallbackNodeType = Repository.NT_FILE;
        } else { // i.e. IResource.FOLDER
View Full Code Here

            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

            MessageDialog.openWarning(null, "Unable to change primary type", "Exception occured while trying to "+
                    "verify node types: "+e1);
            return;
        }
        String thisNodeType = getPrimaryType();
        final SerializationKind currentSk = getSerializationKind(thisNodeType);
        final SerializationKind newSk = getSerializationKind(newPrimaryType);
       
        if (currentSk.equals(newSk)) {
            if (newSk!=SerializationKind.FOLDER) {
                // easiest - we should just be able to change the type in the .content.xml
                properties.doSetPropertyValue("jcr:primaryType", newPrimaryType);
View Full Code Here

TOP

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

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.