Package org.jboss.dna.graph.request

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


            return actualSourceLocation.with(path);
        }
        // Record that there was an error projecting the results ...
        String whereInSource = actualSourceLocation.getString(getExecutionContext().getNamespaceRegistry());
        String msg = GraphI18n.unableToProjectSourceInformationIntoWorkspace.text(whereInSource, getSourceName(), projection);
        originalRequest.setError(new InvalidRequestException(msg));
        return null;
    }
View Full Code Here


        this.txn = txn;
    }

    protected boolean updatesAllowed( Request request ) {
        if (!updatesAllowed) {
            request.setError(new InvalidRequestException(GraphI18n.sourceIsReadOnly.text(getSourceName())));
        }
        return !request.hasError();
    }
View Full Code Here

        // There's a separate flag to allow creating workspaces (which may not require modifying existing data)
        // if (!updatesAllowed(request)) return;

        if (!repository.isWritable()) {
            String msg = GraphI18n.sourceIsReadOnly.text(repository.getSourceName());
            request.setError(new InvalidRequestException(msg));
            return;
        }

        WritablePathRepository writableRepo = (WritablePathRepository)repository;
View Full Code Here

        PathNode node = getTargetNode(workspace, request, request.from());
        if (node == null) return;

        if (!(intoWorkspace instanceof WritablePathWorkspace)) {
            I18n msg = GraphI18n.workspaceIsReadOnly;
            request.setError(new InvalidRequestException(msg.text(repository.getSourceName(), intoWorkspace.getName())));
            return;
        }

        WritablePathWorkspace newWorkspace = (WritablePathWorkspace)intoWorkspace;
View Full Code Here

        PathWorkspace original = repository.getWorkspace(nameOfWorkspaceToBeCloned);
        PathWorkspace target = repository.getWorkspace(targetWorkspaceName);

        if (!repository.isWritable()) {
            String msg = GraphI18n.sourceIsReadOnly.text(repository.getSourceName());
            request.setError(new InvalidRequestException(msg));
            return;
        }

        WritablePathRepository writableRepo = (WritablePathRepository)repository;
View Full Code Here

        PathNode node = getTargetNode(workspace, request, request.from());
        if (node == null) return;

        if (!(intoWorkspace instanceof WritablePathWorkspace)) {
            I18n msg = GraphI18n.workspaceIsReadOnly;
            request.setError(new InvalidRequestException(msg.text(repository.getSourceName(), intoWorkspace.getName())));
            return;
        }

        WritablePathWorkspace newWorkspace = (WritablePathWorkspace)intoWorkspace;
View Full Code Here

            return;
        }

        if (!(workspace instanceof WritablePathWorkspace)) {
            I18n msg = GraphI18n.workspaceIsReadOnly;
            request.setError(new InvalidRequestException(msg.text(repository.getSourceName(), workspace.getName())));
            return;
        }

        WritablePathWorkspace newWorkspace = (WritablePathWorkspace)workspace;
View Full Code Here

        PathNode node = getTargetNode(workspace, request, request.at());
        if (node == null) return;

        if (!(workspace instanceof WritablePathWorkspace)) {
            I18n msg = GraphI18n.workspaceIsReadOnly;
            request.setError(new InvalidRequestException(msg.text(repository.getSourceName(), workspace.getName())));
            return;
        }

        WritablePathWorkspace newWorkspace = (WritablePathWorkspace)workspace;
        newWorkspace.removeNode(getExecutionContext(), node.getPath());
View Full Code Here

            return;
        }

        if (!(workspace instanceof WritablePathWorkspace)) {
            I18n msg = GraphI18n.workspaceIsReadOnly;
            request.setError(new InvalidRequestException(msg.text(repository.getSourceName(), workspace.getName())));
            return;
        }

        WritablePathWorkspace newWorkspace = (WritablePathWorkspace)workspace;
View Full Code Here

        PathNode node = getTargetNode(workspace, request, request.on());
        if (node == null) return;

        if (!(workspace instanceof WritablePathWorkspace)) {
            I18n msg = GraphI18n.workspaceIsReadOnly;
            request.setError(new InvalidRequestException(msg.text(repository.getSourceName(), workspace.getName())));
            return;
        }

        WritablePathWorkspace newWorkspace = (WritablePathWorkspace)workspace;
View Full Code Here

TOP

Related Classes of org.jboss.dna.graph.request.InvalidRequestException

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.