Examples of UpdatePropertiesRequest


Examples of org.jboss.dna.graph.request.UpdatePropertiesRequest

     *
     * @see org.jboss.dna.graph.request.processor.RequestProcessor#process(org.jboss.dna.graph.request.UpdatePropertiesRequest)
     */
    @Override
    public void process( UpdatePropertiesRequest request ) {
        UpdatePropertiesRequest source = (UpdatePropertiesRequest)federatedRequest.getFirstProjectedRequest().getRequest();
        if (checkErrorOrCancel(request, source)) return;
        request.setActualLocationOfNode(source.getActualLocationOfNode());
    }
View Full Code Here

Examples of org.jboss.dna.graph.request.UpdatePropertiesRequest

                details.addEventType(ChangeType.NODE_ADDED);
                for (Property property : create) {
                    details.addProperty(property);
                }
            } else if (change instanceof UpdatePropertiesRequest) {
                UpdatePropertiesRequest update = (UpdatePropertiesRequest)change;
                for (Map.Entry<Name, Property> entry : update.properties().entrySet()) {
                    Property property = entry.getValue();
                    if (property != null) {
                        details.changeProperty(property);
                    } else {
                        details.removeProperty(entry.getKey());
View Full Code Here

Examples of org.jboss.dna.graph.request.UpdatePropertiesRequest

     * @param request the request to remove the property
     */
    public void process( RemovePropertyRequest request ) {
        if (request == null) return;
        Map<Name, Property> properties = Collections.singletonMap(request.propertyName(), null);
        UpdatePropertiesRequest update = new UpdatePropertiesRequest(request.from(), request.inWorkspace(), properties);
        process(update);
        if (update.hasError()) {
            request.setError(update.getError());
        }
        // Set the actual location ...
        request.setActualLocationOfNode(update.getActualLocationOfNode());
    }
View Full Code Here

Examples of org.jboss.dna.graph.request.UpdatePropertiesRequest

     */
    public void process( SetPropertyRequest request ) {
        if (request == null) return;
        Property property = request.property();
        Map<Name, Property> properties = Collections.singletonMap(property.getName(), property);
        UpdatePropertiesRequest update = new UpdatePropertiesRequest(request.on(), request.inWorkspace(), properties);
        process(update);
        if (update.hasError()) {
            request.setError(update.getError());
        } else {
            // Set the actual location ...
            request.setActualLocationOfNode(update.getActualLocationOfNode());
        }
    }
View Full Code Here

Examples of org.jboss.dna.graph.request.UpdatePropertiesRequest

    protected void assertNextRequestUpdateProperties( Location on,
                                                      Property... properties ) {
        Request request = executedRequests.poll();
        assertThat(request, is(instanceOf(UpdatePropertiesRequest.class)));
        UpdatePropertiesRequest read = (UpdatePropertiesRequest)request;
        assertThat(read.on(), is(on));
        assertThat(read.properties().values(), hasItems(properties));
    }
View Full Code Here

Examples of org.jboss.dna.graph.requests.UpdatePropertiesRequest

     * @see org.jboss.dna.graph.requests.processor.RequestProcessor#process(org.jboss.dna.graph.requests.UpdatePropertiesRequest)
     */
    @Override
    public void process( UpdatePropertiesRequest request ) {
        Location locationInSource = projectIntoSource(request.on());
        UpdatePropertiesRequest projected = new UpdatePropertiesRequest(locationInSource, request.properties());
        getConnection().execute(this.getExecutionContext(), projected);
        if (projected.hasError()) {
            projectError(projected, request.on(), request);
            return;
        }
    }
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.