Package org.jboss.dna.graph.request

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


                                          String workspaceName ) {
        // Get the workspace for this request ...
        PathWorkspace workspace = repository.getWorkspace(workspaceName);
        if (workspace == null) {
            String msg = GraphI18n.workspaceDoesNotExistInRepository.text(workspaceName, repository.getSourceName());
            request.setError(new InvalidWorkspaceException(msg));
        }
        return workspace;
    }
View Full Code Here


                                                            request.desiredNameOfNewWorkspace(),
                                                            request.conflictBehavior());
        if (workspace == null) {
            String msg = GraphI18n.workspaceAlreadyExistsInRepository.text(request.desiredNameOfNewWorkspace(),
                                                                           repository.getSourceName());
            request.setError(new InvalidWorkspaceException(msg));
        } else {
            MapNode root = workspace.getRoot();
            request.setActualRootLocation(Location.create(pathFactory.createRootPath(), root.getUuid()));
            request.setActualWorkspaceName(workspace.getName());
            recordChange(request);
View Full Code Here

            MapNode root = workspace.getRoot();
            request.setActualRootLocation(Location.create(pathFactory.createRootPath(), root.getUuid()));
            recordChange(request);
        } else {
            String msg = GraphI18n.workspaceDoesNotExistInRepository.text(request.workspaceName(), repository.getSourceName());
            request.setError(new InvalidWorkspaceException(msg));
        }
    }
View Full Code Here

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

        if (target != null) {
            String msg = GraphI18n.workspaceAlreadyExistsInRepository.text(targetWorkspaceName, repository.getSourceName());
            request.setError(new InvalidWorkspaceException(msg));
            return;
        }

        if (original == null) {
            switch (request.cloneConflictBehavior()) {
                case DO_NOT_CLONE:
                    String msg = GraphI18n.workspaceDoesNotExistInRepository.text(nameOfWorkspaceToBeCloned,
                                                                                  repository.getSourceName());
                    request.setError(new InvalidWorkspaceException(msg));
                    return;
                case SKIP_CLONE:
                    target = repository.createWorkspace(context, targetWorkspaceName, request.targetConflictBehavior());
                    assert target != null;
View Full Code Here

                                         String workspaceName ) {
        // Get the workspace for this request ...
        MapWorkspace workspace = repository.getWorkspace(workspaceName);
        if (workspace == null) {
            String msg = GraphI18n.workspaceDoesNotExistInRepository.text(workspaceName, repository.getSourceName());
            request.setError(new InvalidWorkspaceException(msg));
        }
        return workspace;
    }
View Full Code Here

            return defaultWorkspace;
        }
        FederatedWorkspace workspace = workspacesByName.get(name);
        if (workspace == null) {
            String msg = GraphI18n.workspaceDoesNotExistInFederatedRepository.text(name, getSourceName());
            throw new InvalidWorkspaceException(msg);
        }
        return workspace;
    }
View Full Code Here

                    name = request.desiredNameOfNewWorkspace() + ++counter;
                    break;
                case DO_NOT_CREATE:
                default:
                    String msg = JpaConnectorI18n.workspaceAlreadyExists.text(getSourceName(), name);
                    request.setError(new InvalidWorkspaceException(msg));
                    return;
            }
        }
        // Create the workspace ...
        WorkspaceEntity entity = workspaces.create(name);
View Full Code Here

                    name = request.desiredNameOfTargetWorkspace() + ++counter;
                    break;
                case DO_NOT_CREATE:
                default:
                    String msg = JpaConnectorI18n.workspaceAlreadyExists.text(getSourceName(), name);
                    request.setError(new InvalidWorkspaceException(msg));
                    return;
            }
        }
        String fromWorkspaceName = request.nameOfWorkspaceToBeCloned();
        WorkspaceEntity fromWorkspace = workspaces.get(fromWorkspaceName, false);
View Full Code Here

                    // Create it anyway ...
                    return workspaces.create(workspaceName);
                }
            }
            String msg = JpaConnectorI18n.workspaceDoesNotExist.text(getSourceName(), workspaceName);
            request.setError(new InvalidWorkspaceException(msg));
        }
        return workspace;
    }
View Full Code Here

                                                            request.desiredNameOfNewWorkspace(),
                                                            request.conflictBehavior());
        if (workspace == null) {
            String msg = GraphI18n.workspaceAlreadyExistsInRepository.text(request.desiredNameOfNewWorkspace(),
                                                                           repository.getSourceName());
            request.setError(new InvalidWorkspaceException(msg));
        } else {
            MapNode root = workspace.getRoot();
            request.setActualRootLocation(Location.create(pathFactory.createRootPath(), root.getUuid()));
            request.setActualWorkspaceName(workspace.getName());
            recordChange(request);
View Full Code Here

TOP

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

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.