Examples of TransformationResult


Examples of org.apache.sling.installer.api.tasks.TransformationResult

                            RESTART_ACTIVE_BUNDLES_ID,
                            null,
                            new Hashtable<String, Object>(),
                            InstallableResource.TYPE_PROPERTIES, "1",
                            null, null, null));
            final TransformationResult result = new TransformationResult();
            result.setId(RESTART_ACTIVE_BUNDLES_ID);
            result.setResourceType(RESTART_ACTIVE_BUNDLES_TYPE);
            this.transform(rr, new TransformationResult[] {result});
        }
    }
View Full Code Here

Examples of org.apache.sling.installer.api.tasks.TransformationResult

        // remove resource from unknown list
        this.untransformedResources.remove(resource);
        try {
            for(int i=0; i<result.length; i++) {
                // check the result
                final TransformationResult tr = result[i];
                if ( tr == null ) {
                    logger.warn("Ignoring null result for {}", resource);
                    continue;
                }
                if ( tr.getResourceType() != null && tr.getId() == null) {
                    logger.error("Result for {} contains new resource type {} but no unique id!",
                            resource, tr.getResourceType());
                    continue;
                }
                final RegisteredResourceImpl clone =  (RegisteredResourceImpl)((RegisteredResourceImpl)resource).clone(result[i]);
                this.checkInstallable(clone);
            }
View Full Code Here

Examples of org.apache.sling.installer.api.tasks.TransformationResult

        final InstallableResource r = new InstallableResource(url, null, data, digest, null, priority);
        final InternalResource internal = InternalResource.create("test", r);
        final RegisteredResourceImpl rr = RegisteredResourceImpl.create(internal);
        TransformationResult[] tr = new DefaultTransformer().transform(rr);
        if ( tr == null ) {
            final TransformationResult result = new TransformationResult();
            result.setId(url);
            result.setResourceType(InstallableResource.TYPE_CONFIG);
            tr = new TransformationResult[] {
                      result
            };
        }
        final RegisteredResourceImpl result = (RegisteredResourceImpl)rr.clone(tr[0]);
        if ( state != null ) {
            result.setState(state);
        }
        return result;
    }
View Full Code Here

Examples of org.apache.sling.installer.api.tasks.TransformationResult

            return null;
        } else {
            properties.put(PROPERTY_ARCHIVE_FORMAT, archiveFormat);
        }

        TransformationResult tr = new TransformationResult();
        // try {
        // tr.setInputStream(registeredResource.getInputStream());
        // } catch (IOException e) {
        // log.error(String.format("Unable to transform RegisteredResource %s with type %s and scheme %s",
        // registeredResource.getURL(), registeredResource.getType(), registeredResource.getScheme()),e);
        // return null;
        // }
        tr.setId(indexName + '.' + SOLR_INDEX_ARCHIVE_EXTENSION + '.' + archiveFormat);
        tr.setAttributes(properties);
        tr.setResourceType(SOLR_INDEX_ARCHIVE_RESOURCE_TYPE);
        return new TransformationResult[] {tr};
    }
View Full Code Here

Examples of org.apache.sling.installer.api.tasks.TransformationResult

            return null;
        } else {
            properties.put(PROPERTY_ARCHIVE_FORMAT, archiveFormat);
        }

        TransformationResult tr = new TransformationResult();
        // try {
        // tr.setInputStream(registeredResource.getInputStream());
        // } catch (IOException e) {
        // log.error(String.format("Unable to transform RegisteredResource %s with type %s and scheme %s",
        // registeredResource.getURL(), registeredResource.getType(), registeredResource.getScheme()),e);
        // return null;
        // }
        tr.setId(indexName + '.' + SOLR_INDEX_ARCHIVE_EXTENSION + '.' + archiveFormat);
        tr.setAttributes(properties);
        tr.setResourceType(SOLR_INDEX_ARCHIVE_RESOURCE_TYPE);
        return new TransformationResult[] {tr};
    }
View Full Code Here

Examples of org.apache.sling.installer.api.tasks.TransformationResult

            return null;
        } else {
            properties.put(PROPERTY_ARCHIVE_FORMAT, archiveFormat);
        }

        TransformationResult tr = new TransformationResult();
        // try {
        // tr.setInputStream(registeredResource.getInputStream());
        // } catch (IOException e) {
        // log.error(String.format("Unable to transform RegisteredResource %s with type %s and scheme %s",
        // registeredResource.getURL(), registeredResource.getType(), registeredResource.getScheme()),e);
        // return null;
        // }
        tr.setId(indexName + '.' + SOLR_INDEX_ARCHIVE_EXTENSION + '.' + archiveFormat);
        tr.setAttributes(properties);
        tr.setResourceType(SOLR_INDEX_ARCHIVE_RESOURCE_TYPE);
        return new TransformationResult[] {tr};
    }
View Full Code Here

Examples of sample.cluster.transformation.TransformationMessages.TransformationResult

  @Override
  public void onReceive(Object message) {
    if (message instanceof TransformationJob) {
      TransformationJob job = (TransformationJob) message;
      getSender().tell(new TransformationResult(job.getText().toUpperCase()),
          getSelf());

    } else if (message instanceof CurrentClusterState) {
      CurrentClusterState state = (CurrentClusterState) message;
      for (Member member : state.getMembers()) {
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.