Package org.globus.workspace.client_core.repr

Examples of org.globus.workspace.client_core.repr.Workspace


        if (this.isGroupRequest) {
            throw new IllegalStateException(
                    "group requests should have been rejected already");
        }

        final Workspace workspace = new Workspace();

        workspace.setEpr(this.epr);
        workspace.setCurrentState(new State());

        this.workspaces = new Workspace[1];
        this.workspaces[0] = workspace;
    }
View Full Code Here


       
        if (report == null) {
            throw new IllegalArgumentException("report may not be null");
        }

        final Workspace workspace = new Workspace();

        final EndpointReferenceType anepr = report.getEpr();

        final State state =
                State.fromCurrentState_Type(report.getCurrentState());

        if (anepr == null) {
            this.pr.debugln("Workspace # NONE");
        } else {
            this.pr.debugln("Workspace # " +
                                EPRUtils.getIdFromEPR(report.getEpr()));
        }

        if (state == null) {
            this.pr.debugln("  - state: NONE");
        } else {
            this.pr.debugln("  - state: " + state.getState());
            final Exception e = state.getProblem();
            if (e != null) {
                this.pr.debugln("  - error: " +
                        CommonUtil.genericExceptionMessageWrapper(e));
            }
        }

        workspace.setEpr(anepr);
        workspace.setCurrentState(state);

        final Schedule_Type xmlSchedule = report.getSchedule();
        if (xmlSchedule != null) {
            workspace.setCurrentSchedule(new Schedule(xmlSchedule));
        }

        final VirtualNetwork_Type xmlNetwork = report.getNetworking();
        if (xmlNetwork != null) {
            workspace.setCurrentNetworking(new Networking(xmlNetwork));
        }

        return workspace;
    }
View Full Code Here

        boolean allAtState = true;
        boolean oneErrorExists = false;

        for (int i = 0; i < workspaces.length; i++) {
           
            final Workspace workspace = workspaces[i];
            final State state = workspace.getCurrentState();

            if (state == null) {

                allAtState = false;
View Full Code Here

                            WorkspaceCreateResponse_Type response)

            throws ExecutionProblem {


        final Workspace workspace = new Workspace();

        // these things are not based on any information returned
        try {
            this.populateInitialRepr(workspace);
        } catch (ParameterProblem e) {
            throw new ExecutionProblem(
                        "unexpected problem: " + e.getMessage(), e);
        }

        // length/not-null already checked
        final CreatedWorkspace_Type[] allrefs = response.getCreatedWorkspace();

        final Schedule_Type xmlSchedule = allrefs[0].getSchedule();
        if (xmlSchedule == null) {
            throw new ExecutionProblem(
                    "(?) no schedule in factory response");
        }

        final VirtualNetwork_Type xmlNetwork = allrefs[0].getNetworking();
        if (xmlNetwork != null) {
            workspace.setCurrentNetworking(new Networking(xmlNetwork));
        }

        workspace.setEpr(allrefs[0].getEpr());

        try {
            workspace.setInitialSchedule(new Schedule(xmlSchedule));
            // this is intentionally a separate object:
            workspace.setCurrentSchedule(new Schedule(xmlSchedule));
        } catch (InvalidDurationException e) {
            throw new ExecutionProblem(
                    "(?) invalid data in factory response: " +
                            e.getMessage(), e);
        }

        final EndpointReferenceType ensembleEPR = response.getEnsembleEPR();
        if (ensembleEPR != null) {
            workspace.setEnsembleMemberEPR(ensembleEPR);
        }

        final EndpointReferenceType contextEPR = response.getContextEPR();
        if (contextEPR != null) {
            workspace.setContextMemberEPR(contextEPR);
        }

        return workspace;
    }
View Full Code Here

        if (rpSet == null) {
            throw new IllegalArgumentException("rpSet may not be null");
        }

        final Workspace workspace = new Workspace();

        final CurrentState curr = rpSet.getCurrentState();

        workspace.setCurrentState(State.fromCurrentState_Type(curr));

        final Logistics log = rpSet.getLogistics();

        final VirtualNetwork_Type t_network = log.getNetworking();

        if (t_network != null &&
                t_network.getNic() != null &&
                    t_network.getNic().length > 0) {
            workspace.setCurrentNetworking(new Networking(t_network));
        }

        workspace.setEpr(endpoint);

        final Schedule_Type xmlSched = rpSet.getSchedule();
        if (xmlSched != null) {
            final Schedule schedule = new Schedule(xmlSched);
            workspace.setCurrentSchedule(schedule);
        }

        return workspace;
    }
View Full Code Here

        final EndpointReferenceType contextEPR = response.getContextEPR();

        final ArrayList workspaceList = new ArrayList(allrefs.length);
        for (int i = 0; i < allrefs.length; i++) {

            final Workspace workspace = new Workspace();

            // these things are not based on any information returned
            try {
                this.populateInitialRepr(workspace);
            } catch (ParameterProblem e) {
                throw new ExecutionProblem(
                            "unexpected problem: " + e.getMessage(), e);
            }
           
            final Schedule_Type xmlSchedule = allrefs[i].getSchedule();
            if (xmlSchedule == null) {
                throw new ExecutionProblem(
                        "(?) no schedule in factory response");
            }

            try {
                workspace.setInitialSchedule(new Schedule(xmlSchedule));
                // this is intentionally a separate object:
                workspace.setCurrentSchedule(new Schedule(xmlSchedule));
            } catch (InvalidDurationException e) {
                throw new ExecutionProblem(
                        "(?) invalid data in factory response: " +
                                e.getMessage(), e);
            }

            final VirtualNetwork_Type xmlNetwork = allrefs[i].getNetworking();
            if (xmlNetwork != null) {
                workspace.setCurrentNetworking(new Networking(xmlNetwork));
            }

            workspace.setEpr(allrefs[i].getEpr());
            workspace.setGroupMemberEPR(groupEPR);
            workspace.setEnsembleMemberEPR(ensembleEPR);
            workspace.setContextMemberEPR(contextEPR);

            workspaceList.add(workspace);
        }

        final Group group = new Group();
View Full Code Here

        if (oneCurrent == null) {
            throw new IllegalArgumentException("oneCurrent may not be null");
        }

        final Workspace workspace = new Workspace();

        final CurrentState curr = oneCurrent.getCurrentState();

        workspace.setCurrentState(State.fromCurrentState_Type(curr));

        final Logistics log = oneCurrent.getLogistics();

        final VirtualNetwork_Type t_network = log.getNetworking();

        if (t_network != null &&
                t_network.getNic() != null &&
                    t_network.getNic().length > 0) {
            workspace.setCurrentNetworking(new Networking(t_network));
        }

        workspace.setEpr(oneCurrent.getEpr());
        workspace.setDetails(oneCurrent.getDetails());

        final Schedule_Type xmlSched = oneCurrent.getSchedule();
        if (xmlSched != null) {
            final Schedule schedule = new Schedule(xmlSched);
            workspace.setCurrentSchedule(schedule);
        }

        return workspace;
    }
View Full Code Here

                                            this.pr);

                // nothing to do but log errors if they occur
                try {
                    final Schedule schedule = query.queryOnce();
                    final Workspace w = new Workspace();
                    w.setCurrentSchedule(schedule);
                    ScheduleUtils.instanceCreateResultSchedulePrint(this.pr, w);
                } catch (Throwable t) {
                    if (this.pr.enabled()) {
                        final String err = "\"" + workspace.getDisplayName() +
                                "\" schedule query did not succeed: " +
View Full Code Here

            return; // *** EARLY RETURN ***
        }

        try {
            final Workspace workspace =
                    ((RPQueryInstance)this.instanceAction).queryOnce();
            this.print(workspace);
        } catch (BaseFaultType e) {
            final String err = CommonStrings.faultStringOrCommonCause(e);
            throw new ExecutionProblem(err, e);
View Full Code Here

        if (print == null) {
            throw new IllegalArgumentException("print may not be null");
        }

        final Workspace workspace = container.getWorkspace();
       
        if (workspace.getEpr() == null) {
            throw new IllegalArgumentException("workspace EPR may not be null");
        }

        final AddressIDPair addrID = chooseAddrID(workspace.getEpr(), print);

        if (addrID == null) {
            throw new IllegalArgumentException("invalid workspace EPR");
        }
View Full Code Here

TOP

Related Classes of org.globus.workspace.client_core.repr.Workspace

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.