Package org.nimbustools.messaging.gt4_0

Examples of org.nimbustools.messaging.gt4_0.EPRGenerator


            throw new Exception(prefix + "no MessageElement[]");
        }

        final State state;
        try {
            final CurrentState currentState =
                    (CurrentState) me[0].getValueAsType(
                                Constants_GT4_0.RP_CURRENT_STATE,
                                CurrentState.class);

            state = State.fromCurrentState_Type(currentState);
View Full Code Here


            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();
View Full Code Here

            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();
View Full Code Here

        }

        final boolean returnOnlyIfCorrupt =
                            send.isReturnOnlyIfErrorPresent();

        final CurrentState_Enumeration returnOnlyIfAll =
                            send.getReturnOnlyIfAllAtState();


        if (returnOnlyIfCorrupt || returnOnlyIfAll != null) {
View Full Code Here

    private static boolean isCorrupt(OneReport_Type report) {
        final CurrentState state = report.getCurrentState();
        if (state == null) {
            return true;
        }
        final CurrentState_Enumeration stateString = state.getState();
        return CurrentState_Enumeration.Cancelled.equals(stateString) ||
                CurrentState_Enumeration.Corrupted.equals(stateString);
    }
View Full Code Here

        if (curr == null) {
            return null;
        }

        final CurrentState_Enumeration val = curr.getState();
        if (val == null) {
            return null;
        }

        State ret = null;
        if (testValidState(val.getValue())) {
            ret = new State(val.getValue());
            final WorkspaceFault fault = curr.getWorkspaceFault();
            if (fault != null) {
                ret.setProblem(fault);
            }
        }
View Full Code Here

        if (vm == null) {
            return null;
        }

        final OneReport_Type report = new OneReport_Type();

        report.setEpr(this.trinst.getEPR(vm.getID()));

        report.setCurrentState(this.trinst.getCurrentState(vm));

        report.setNetworking(this.trinst.getLogistics(vm).getNetworking());

        report.setSchedule(this.trinst.getSchedule_Type(vm));

        return report;
    }
View Full Code Here

            net = log.getNetworking();
        }

        final CustomizeTask_Type[] customizes;

        final OptionalParameters_Type optional = wsreq.getOptionalParameters();
        if (optional != null) {
            customizes = optional.getFilewrite();
            req.setMdUserData(optional.getMdServerUserdata());
            req.setCredential(optional.getCredentialToCopy());
        } else {
            customizes = null;
        }

        // Boolean object can be null for conversion like this (null==false)
View Full Code Here

                    }
                }
            }

            if (returnOnlyIfCorrupt && oneCorrupt) {
                return new ReportResponse_Type(reports);
            } else if (returnOnlyIfAll != null && allAtState) {
                return new ReportResponse_Type(reports);
            } else {
                return new ReportResponse_Type(EMPTY_REPORTS);
            }
        }

        return new ReportResponse_Type(reports);
    }
View Full Code Here

                                 WorkspaceUnknownFault,
                                 WorkspaceEnsembleFault {

        this.validateAll();

        final ReportResponse_Type response;
        try {
            final ReportSend_Type send = new ReportSend_Type();
            send.setReturnOnlyIfErrorPresent(this.responseOnlyIfError);
            if (this.returnOnlyIfAll != null) {
                send.setReturnOnlyIfAllAtState(this.returnOnlyIfAll);
            }
            final String now =
                    localFormat.format(Calendar.getInstance().getTime());
            this.pr.debugln("Querying for report @ " + now);
            response = ((WorkspaceEnsemblePortType) this.portType).report(send);
        } catch (WorkspaceEnsembleFault e) {
            throw e;
        } catch (RemoteException e) {
            throw RMIUtils.generalRemoteException(e);
        }

        if (response == null) {
            throw new ExecutionProblem("null report response?");
        }

        final OneReport_Type[] reports = response.getReport();
        if (reports == null) {
            return EMPTY_RESPONSE;
        }

        final Workspace[] ret = new Workspace[reports.length];
View Full Code Here

TOP

Related Classes of org.nimbustools.messaging.gt4_0.EPRGenerator

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.