com.genesyslab.wfm7.API.service.scheduleTrade720

## Interface WFMScheduleTradeService720Soap

- All Superinterfaces:
    java.rmi.Remote

      public interface WFMScheduleTradeService720Soap
      extends java.rmi.Remote

  It is supervisor's responsibility to review pending trade request and approve or decline them in timely fashion. If supervisor selects to approve pending trade, it doesn't necessarily mean that trade will be approved - the auto-decline conditions are re-checked again and if there were any changes to agent's profile that would prevent schedule trade then trade would be auto-declined instead. Auto-Approval process is run every time once trade record is submitted, that is after response is accepted by proposing agent or after personal proposal is accepted by responding agent in case of one-way handshake. Auto-approval procedure applies Trading Rules and decides whether trade can be auto-approved, auto-declined or if it requires manual review by supervisor to decide its fate. Pending trades, proposals or responses are automatically cancelled if proposal or response schedules are modified in Master Schedule in any way. For instance, that could be schedule modified manually by supervisor or another trade with overlapping schedule data was approved and executed. Schedule Trade Service provides API for querying trade proposals addressed to or originating from specified agent. It allows specifying different filters and sort order. Query result is a list of sorted Proposal records. Schedule Trade Service provides API for querying trade responses addressed to or originating from specified agent. It allows specifying different filters and sort order. Query result is a list of sorted Response records. Schedule Trade Service provides API for querying trades. It allows specifying different filters and sort order. Query result is a list of sorted Trade records. Returned trades are filtered according to querying user access rights - user should have access to both proposing and responding agents in order to see the trade.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `SchTradeResponseStatus` | `acceptTradeProposal(int siteID, int agentID, int proposalID, java.lang.String comments)` Acceptation of proposal creates a response record, which goes back to proposing agent for final handshake.
    `SchTradeProposalStatus` | `acceptTradeResponse(int siteID, int agentID, int proposalID, int responseID, java.lang.String comments)` A response to proposal should be accepted by proposing agent in order to schedule trade to be submitted for approval.
    `void` | `acknowledgeNotification(int siteID, long timestamp)` Acknowledges to the server that notification was received and processed.
    `SchTradeStatus` | `approveTrade(int siteID, int tradeID, java.lang.String comments)` A supervisor may approve pending trade.
    `SchTradeProposalStatus` | `cancelTradeProposal(int siteID, int agentID, int proposalID, java.lang.String comments)` A proposal can be canceled by proposing agent at any time while proposal is in "Open" or "In Review" status.
    `SchTradeResponseStatus` | `cancelTradeResponse(int siteID, int agentID, int responseID, java.lang.String comments)` A response to proposal can be canceled by responding agent at any time while proposal is in "Accept" or "In Review" status.
    `SchValidationHolder` | `checkTrade(int siteID, int tradeID)` Checks weather trade would violate any "soft" or "hard" constraints.
    `SchTradeProposalStatus` | `declinePersonalTradeProposal(int siteID, int agentID, int proposalID, java.lang.String comments)` Responding agent may select to decline personal trade proposal.
    `SchTradeStatus` | `declineTrade(int siteID, int tradeID, java.lang.String comments)` A supervisor may decline the trade.
    `SchTradeResponseStatus` | `declineTradeResponse(int siteID, int agentID, int responseID, java.lang.String comments)` A proposing agent can select to decline response from community to community proposal as well as response from agent responding to personal proposal if two-way handshake was requested.
    `SchTradeHolder` | `fetchTradeFromSnapshot(java.lang.String snapshotID, int firstIndex, int lastIndex, int schStateLayout, boolean schProvideStateInfo, boolean cfgProvideAgentInfo, boolean cfgProvideTeamInfo, boolean cfgProvideContractInfo)` Retrieves a specified range of trades from snapshot.
    `SchTradeProposalHolder` | `fetchTradeProposalFromSnapshot(java.lang.String snapshotID, int firstIndex, int lastIndex, int schStateLayout, boolean schProvideStateInfo, boolean cfgProvideAgentInfo, boolean cfgProvideTeamInfo, boolean cfgProvideContractInfo)` Retrieves a specified range of trade proposals from snapshot.
    `SchTradeResponseHolder` | `fetchTradeResponseFromSnapshot(java.lang.String snapshotID, int firstIndex, int lastIndex, int schStateLayout, boolean schProvideStateInfo, boolean cfgProvideAgentInfo, boolean cfgProvideTeamInfo, boolean cfgProvideContractInfo)` Retrieves a specified range of trade responses from snapshot.
    `SchTradeHolder` | `getTrade(int siteID, double startDate, double endDate, int[] teamIDArray, int[] agentIDArray, int[] statusFilter, int tradeSortMode, int agentSortMode, boolean sortAscending, int schStateLayout, boolean schProvideStateInfo, boolean cfgProvideAgentInfo, boolean cfgProvideTeamInfo, boolean cfgProvideContractInfo)` List trades by applying specified filters and sort order.
    `SchTradeHolder` | `getTradeByID(int siteID, int[] tradeIDArray, int schStateLayout, boolean schProvideStateInfo, boolean cfgProvideAgentInfo, boolean cfgProvideTeamInfo, boolean cfgProvideContractInfo)` Loads specific trade for specified Trade ID.
    `SchCandidate` | `getTradeCandidates(int siteID, int agentID, double[] days, int[] teamIDFilter)` Retrieves list of agents with whom agent trade is possible
    `SchTradeProposalHolder` | `getTradeProposal(int siteID, int agentID, int origin, double startDate, double endDate, int[] teamFilter, int[] typeFilter, int[] statusFilter, int proposalSortMode, int agentSortMode, boolean sortAscending, int schStateLayout, boolean schProvideStateInfo, boolean cfgProvideAgentInfo, boolean cfgProvideTeamInfo, boolean cfgProvideContractInfo)` List trade proposals for specified agent by applying specified filters and sort order.
    `SchTradeProposalHolder` | `getTradeProposalByID(int siteID, int[] proposalIDArray, int schStateLayout, boolean schProvideStateInfo, boolean cfgProvideAgentInfo, boolean cfgProvideTeamInfo, boolean cfgProvideContractInfo)` Loads specific trade proposal(s) for specified Proposal ID.
    `SchTradeResponseHolder` | `getTradeResponse(int siteID, int agentID, int origin, double startDate, double endDate, int[] statusFilter, int responseSortMode, int agentSortMode, boolean sortAscending, int schStateLayout, boolean schProvideStateInfo, boolean cfgProvideAgentInfo, boolean cfgProvideTeamInfo, boolean cfgProvideContractInfo)` List trade responses for specified agent by applying specified filters and sort order.
    `SchTradeResponseHolder` | `getTradeResponseByID(int siteID, int[] responseIDArray, int schStateLayout, boolean schProvideStateInfo, boolean cfgProvideAgentInfo, boolean cfgProvideTeamInfo, boolean cfgProvideContractInfo)` Loads specific trade response(s) for specified Response ID.
    `SchTradeUnansweredHolder` | `getUnanswered(int siteID, int agentID, double startDate, double endDate)` Retrieves agent proposals with no response
    `SchTradeProposalSnapshot` | `openTradeProposalSnapshot(int siteID, int agentID, int origin, double startDate, double endDate, int[] teamFilter, int[] typeFilter, int[] statusFilter, int proposalSortMode, int agentSortMode, boolean sortAscending)` Creates a snapshot of list of proposals on server side that can be accessed later in small portions.
    `SchTradeResponseSnapshot` | `openTradeResponseSnapshot(int siteID, int agentID, int origin, double startDate, double endDate, int[] statusFilter, int responseSortMode, int agentSortMode, boolean sortAscending)` Creates a snapshot of list of responses on server side that can be accessed later in small portions.
    `SchTradeSnapshot` | `openTradeSnapshot(int siteID, double startDate, double endDate, int[] teamIDArray, int[] agentIDArray, int[] statusFilter, int tradeSortMode, int agentSortMode, boolean sortAscending)` Creates a snapshot of list of trades on server side that can be accessed later in small portions.
    `SchTradeNotification` | `pollNotification(long timestamp, int siteID, int[] teamIDArray, int[] agentIDArray, double startDate, double endDate, int detailsLevel, int stateLayout, int[] excludeStates, boolean provideStateInfo, boolean provideAgentInfo, boolean provideTeamInfo, boolean provideContractInfo)` Polls schedule change notification
    `SchTradeProposalStatus` | `postTradeProposal(int siteID, int agentID, double[] dateArray, java.lang.String comments)` A trade proposal is posted to community and is available to all qualifying agents.
    `SchTradeProposalStatus` | `sendPersonalTradeProposal(int siteID, int agentID, int directToAgentID, int handshake, double[] dateArray, java.lang.String comments)` A trade proposal is sent directly to specified agent.
    `void` | `sortTradeProposalSnapshot(java.lang.String snapshotID, int proposalSortMode, int agentSortMode, boolean sortAscending)` Changes trade proposal snapshot sort mode and/or order.
    `void` | `sortTradeResponseSnapshot(java.lang.String snapshotID, int responseSortMode, int agentSortMode, boolean sortAscending)` Changes trade response snapshot sort mode and/or order.
    `void` | `sortTradeSnapshot(java.lang.String snapshotID, int tradeSortMode, int agentSortMode, boolean sortAscending)` Changes trade snapshot sort mode and/or order.

- - ### Method Detail

    - #### getTradeProposalByID

          SchTradeProposalHolder getTradeProposalByID(int siteID,
                                                    int[] proposalIDArray,
                                                    int schStateLayout,
                                                    boolean schProvideStateInfo,
                                                    boolean cfgProvideAgentInfo,
                                                    boolean cfgProvideTeamInfo,
                                                    boolean cfgProvideContractInfo)
                                                      throws java.rmi.RemoteException

      Loads specific trade proposal(s) for specified Proposal ID.
      Parameters:
        `siteID` - Site ID
        `proposalIDArray` - List of IDs of proposal to load
        `schStateLayout` - State presentation option
        `schProvideStateInfo` - Provide scheduled state info for every unique state in proposal schedules.
        `cfgProvideAgentInfo` - "true" indicates to provide short information about every unique agent in a proposal result set.
        `cfgProvideTeamInfo` - "true" indicates to provide short information about every unique agent's team in a proposal result set.
        `cfgProvideContractInfo` - "true" indicates to provide short information about every unique agent's contract in a proposal result set.
      Returns:
        `SchTradeProposalHolder`
      Throws:
        `java.rmi.RemoteException`
      See Also:
        `ESchStateLayout`

    - #### getTradeProposal

          SchTradeProposalHolder getTradeProposal(int siteID,
                                                int agentID,
                                                int origin,
                                                double startDate,
                                                double endDate,
                                                int[] teamFilter,
                                                int[] typeFilter,
                                                int[] statusFilter,
                                                int proposalSortMode,
                                                int agentSortMode,
                                                boolean sortAscending,
                                                int schStateLayout,
                                                boolean schProvideStateInfo,
                                                boolean cfgProvideAgentInfo,
                                                boolean cfgProvideTeamInfo,
                                                boolean cfgProvideContractInfo)
                                                  throws java.rmi.RemoteException

      List trade proposals for specified agent by applying specified filters and sort order.
      Parameters:
        `siteID` - Site ID
        `agentID` - An ID of agent
        `origin` - My Proposals, Other Proposals or All Proposals
        `startDate` - Start date of Date window filter
        `endDate` - End date of Date window filter
        `teamFilter` - Defines filter for team of proposing agent. A null value means "any team".
        `typeFilter` - Defines filter for type of proposals. A null value means "all types"
        `statusFilter` - Defines filter for statuses of proposals. A null value means "all statuses"
        `proposalSortMode` - Proposal list sort mode
        `agentSortMode` - Agent list sort mode
        `sortAscending` - Defines sort order
        `schStateLayout` - State presentation option
        `schProvideStateInfo` - Provide scheduled state info for every unique state in proposal schedules.
        `cfgProvideAgentInfo` - "true" indicates to provide short information about every unique agent in a proposal result set.
        `cfgProvideTeamInfo` - "true" indicates to provide short information about every unique agent's team in a proposal result set.
        `cfgProvideContractInfo` - "true" indicates to provide short information about every unique agent's contract in a proposal result set.
      Returns:
        `SchTradeProposalHolder`
      Throws:
        `java.rmi.RemoteException`
      See Also:
        `ESchTradeProposalType`, `ESchTradeProposalStatus`, `ESchTradeProposalSortMode`, `ECfgSortMode.Agent`, `ESchStateLayout`

    - #### openTradeProposalSnapshot

          SchTradeProposalSnapshot openTradeProposalSnapshot(int siteID,
                                                           int agentID,
                                                           int origin,
                                                           double startDate,
                                                           double endDate,
                                                           int[] teamFilter,
                                                           int[] typeFilter,
                                                           int[] statusFilter,
                                                           int proposalSortMode,
                                                           int agentSortMode,
                                                           boolean sortAscending)
                                                             throws java.rmi.RemoteException

      Creates a snapshot of list of proposals on server side that can be accessed later in small portions.
      Parameters:
        `siteID` - Site ID
        `agentID` - An ID of agent
        `origin` - My Proposals, Other Proposals or All Proposals
        `startDate` - Start date of Date window filter
        `endDate` - End date of Date window filter
        `teamFilter` - Defines filter for team of proposing agent. A null value means "any team".
        `typeFilter` - Defines filter for type of proposals. A null value means "all types"
        `statusFilter` - Defines filter for statuses of proposals. A null value means "all statuses"
        `proposalSortMode` - Proposal list sort mode
        `agentSortMode` - Agent list sort mode
        `sortAscending` - Sort order
      Returns:
        `SchTradeProposalSnapshot`
      Throws:
        `java.rmi.RemoteException`
      See Also:
        `ESchTradeProposalType`, `ESchTradeProposalStatus`, `ESchTradeProposalSortMode`, `ECfgSortMode.Agent`

    - #### fetchTradeProposalFromSnapshot

          SchTradeProposalHolder fetchTradeProposalFromSnapshot(java.lang.String snapshotID,
                                                              int firstIndex,
                                                              int lastIndex,
                                                              int schStateLayout,
                                                              boolean schProvideStateInfo,
                                                              boolean cfgProvideAgentInfo,
                                                              boolean cfgProvideTeamInfo,
                                                              boolean cfgProvideContractInfo)
                                                                throws java.rmi.RemoteException

      Retrieves a specified range of trade proposals from snapshot.
      Parameters:
        `snapshotID` - Proposal snapshot ID
        `firstIndex` - First proposal index in snapshot
        `lastIndex` - Last proposal index in snapshot
        `schStateLayout` - State presentation option
        `schProvideStateInfo` - Provide scheduled state info for every unique state in proposal schedules.
        `cfgProvideAgentInfo` - "true" indicates to provide short information about every unique agent in a proposal result set.
        `cfgProvideTeamInfo` - "true" indicates to provide short information about every unique agent's team in a proposal result set.
        `cfgProvideContractInfo` - "true" indicates to provide short information about every unique agent's contract in a proposal result set.
      Returns:
        `SchTradeProposalHolder`
      Throws:
        `java.rmi.RemoteException`
      See Also:
        `ESchStateLayout`

    - #### sortTradeProposalSnapshot

          void sortTradeProposalSnapshot(java.lang.String snapshotID,
                                       int proposalSortMode,
                                       int agentSortMode,
                                       boolean sortAscending)
                                         throws java.rmi.RemoteException

      Changes trade proposal snapshot sort mode and/or order.
      Parameters:
        `snapshotID` - Proposal snapshot ID
        `proposalSortMode` - Proposal list sort mode
        `agentSortMode` - Agent list sort mode
        `sortAscending` - Sort order
      Throws:
        `java.rmi.RemoteException`
      See Also:
        `ESchTradeProposalSortMode`, `ECfgSortMode.Agent`

    - #### getTradeResponseByID

          SchTradeResponseHolder getTradeResponseByID(int siteID,
                                                    int[] responseIDArray,
                                                    int schStateLayout,
                                                    boolean schProvideStateInfo,
                                                    boolean cfgProvideAgentInfo,
                                                    boolean cfgProvideTeamInfo,
                                                    boolean cfgProvideContractInfo)
                                                      throws java.rmi.RemoteException

      Loads specific trade response(s) for specified Response ID.
      Parameters:
        `siteID` - Site ID
        `responseIDArray` - List of response IDs to load
        `schStateLayout` - State presentation option
        `schProvideStateInfo` - Provide scheduled state info for every unique state in proposal schedules.
        `cfgProvideAgentInfo` - "true" indicates to provide short information about every unique agent in a proposal result set.
        `cfgProvideTeamInfo` - "true" indicates to provide short information about every unique agent's team in a proposal result set.
        `cfgProvideContractInfo` - "true" indicates to provide short information about every unique agent's contract in a proposal result set.
      Returns:
        `SchTradeResponseHolder`
      Throws:
        `java.rmi.RemoteException`
      See Also:
        `ESchStateLayout`

    - #### getTradeResponse

          SchTradeResponseHolder getTradeResponse(int siteID,
                                                int agentID,
                                                int origin,
                                                double startDate,
                                                double endDate,
                                                int[] statusFilter,
                                                int responseSortMode,
                                                int agentSortMode,
                                                boolean sortAscending,
                                                int schStateLayout,
                                                boolean schProvideStateInfo,
                                                boolean cfgProvideAgentInfo,
                                                boolean cfgProvideTeamInfo,
                                                boolean cfgProvideContractInfo)
                                                  throws java.rmi.RemoteException

      List trade responses for specified agent by applying specified filters and sort order.
      Parameters:
        `siteID` - Site ID
        `agentID` - An ID of agent receiving responses or sending responses.
        `origin` - Filter responses for "My Responses", "Responses to My Proposals", "All Responses related to me".
        `startDate` - Start date of Date window filter
        `endDate` - End date of Date window filter
        `statusFilter` - Defines filter for statuses of proposals. A null value means "all statuses"
        `responseSortMode` - Response list sort mode
        `agentSortMode` - Agent list sort mode
        `sortAscending` - Sort order
        `schStateLayout` - State presentation option
        `schProvideStateInfo` - Provide scheduled state info for every unique state in proposal schedules.
        `cfgProvideAgentInfo` - "true" indicates to provide short information about every unique agent in a proposal result set.
        `cfgProvideTeamInfo` - "true" indicates to provide short information about every unique agent's team in a proposal result set.
        `cfgProvideContractInfo` - "true" indicates to provide short information about every unique agent's contract in a proposal result set.
      Returns:
        `SchTradeResponseHolder`
      Throws:
        `java.rmi.RemoteException`
      See Also:
        `ESchStateLayout`, `ESchTradeResponseStatus`, `ESchTradeResponseSortMode`, `ECfgSortMode.Agent`

    - #### openTradeResponseSnapshot

          SchTradeResponseSnapshot openTradeResponseSnapshot(int siteID,
                                                           int agentID,
                                                           int origin,
                                                           double startDate,
                                                           double endDate,
                                                           int[] statusFilter,
                                                           int responseSortMode,
                                                           int agentSortMode,
                                                           boolean sortAscending)
                                                             throws java.rmi.RemoteException

      Creates a snapshot of list of responses on server side that can be accessed later in small portions.
      Parameters:
        `siteID` - Site ID
        `agentID` - An ID of agent receiving responses or sending responses.
        `origin` - Filter responses for "My Responses", "Responses to My Proposals", "All Responses related to me".
        `startDate` - Start date of Date window filter
        `endDate` - End date of Date window filter
        `statusFilter` - Defines filter for statuses of proposals. A null value means "all statuses"
        `responseSortMode` - Response list sort mode
        `agentSortMode` - Agent list sort mode
        `sortAscending` - Sort order
      Returns:
        `SchTradeResponseSnapshot`
      Throws:
        `java.rmi.RemoteException`
      See Also:
        `ESchTradeResponseStatus`, `ESchTradeResponseSortMode`, `ECfgSortMode.Agent`

    - #### fetchTradeResponseFromSnapshot

          SchTradeResponseHolder fetchTradeResponseFromSnapshot(java.lang.String snapshotID,
                                                              int firstIndex,
                                                              int lastIndex,
                                                              int schStateLayout,
                                                              boolean schProvideStateInfo,
                                                              boolean cfgProvideAgentInfo,
                                                              boolean cfgProvideTeamInfo,
                                                              boolean cfgProvideContractInfo)
                                                                throws java.rmi.RemoteException

      Retrieves a specified range of trade responses from snapshot.
      Parameters:
        `snapshotID` - Response snapshot ID
        `firstIndex` - First response index in snapshot
        `lastIndex` - Last response index in snapshot
        `schStateLayout` - Defines layout of returned agent day schedule.
        `schProvideStateInfo` - Provide scheduled state info for every unique state in proposal schedules.
        `cfgProvideAgentInfo` - "true" indicates to provide short information about every unique agent in a proposal result set.
        `cfgProvideTeamInfo` - "true" indicates to provide short information about every unique agent's team in a proposal result set.
        `cfgProvideContractInfo` - "true" indicates to provide short information about every unique agent's contract in a proposal result set.
      Returns:
        List of trade responses and agent info (if requested)
      Throws:
        `java.rmi.RemoteException`
      See Also:
        `ESchStateLayout`, `SchTradeResponseHolder`

    - #### sortTradeResponseSnapshot

          void sortTradeResponseSnapshot(java.lang.String snapshotID,
                                       int responseSortMode,
                                       int agentSortMode,
                                       boolean sortAscending)
                                         throws java.rmi.RemoteException

      Changes trade response snapshot sort mode and/or order.
      Parameters:
        `snapshotID` - Trade response snapshot ID
        `responseSortMode` - Response list sort mode
        `agentSortMode` - Agent list sort mode
        `sortAscending` - Sort order
      Throws:
        `java.rmi.RemoteException`
      See Also:
        `ESchTradeResponseSortMode`, `ECfgSortMode.Agent`

    - #### getTradeByID

          SchTradeHolder getTradeByID(int siteID,
                                    int[] tradeIDArray,
                                    int schStateLayout,
                                    boolean schProvideStateInfo,
                                    boolean cfgProvideAgentInfo,
                                    boolean cfgProvideTeamInfo,
                                    boolean cfgProvideContractInfo)
                                      throws java.rmi.RemoteException

      Loads specific trade for specified Trade ID.
      Parameters:
        `siteID` - Site ID
        `tradeIDArray` - A list of trade IDs to load
        `schStateLayout` - Defines layout of returned agent day schedule.
        `schProvideStateInfo` - Provide scheduled state info for every unique state in proposal schedules.
        `cfgProvideAgentInfo` - "true" indicates to provide short information about every unique agent in a proposal result set.
        `cfgProvideTeamInfo` - "true" indicates to provide short information about every unique agent's team in a proposal result set.
        `cfgProvideContractInfo` - "true" indicates to provide short information about every unique agent's contract in a proposal result set.
      Returns:
        Trade result set holder
      Throws:
        `java.rmi.RemoteException`
      See Also:
        `ESchStateLayout`, `SchTradeHolder`

    - #### getTrade

          SchTradeHolder getTrade(int siteID,
                                double startDate,
                                double endDate,
                                int[] teamIDArray,
                                int[] agentIDArray,
                                int[] statusFilter,
                                int tradeSortMode,
                                int agentSortMode,
                                boolean sortAscending,
                                int schStateLayout,
                                boolean schProvideStateInfo,
                                boolean cfgProvideAgentInfo,
                                boolean cfgProvideTeamInfo,
                                boolean cfgProvideContractInfo)
                                  throws java.rmi.RemoteException

      List trades by applying specified filters and sort order.
      Parameters:
        `siteID` - Site ID
        `startDate` - Start date of Date window filter
        `endDate` - End date of Date window filter
        `statusFilter` - Defines filter for statuses of trades. A null value means "all statuses"
        `tradeSortMode` - Proposal Agent, Response Agent. Proposal Paid Hours, Response Paid Hours, Status or None,
        `agentSortMode` - Agent list sort mode
        `sortAscending` - Sort order
        `schStateLayout` - Defines layout of returned agent day schedule.
        `schProvideStateInfo` - Provide scheduled state info for every unique state in proposal schedules.
        `cfgProvideAgentInfo` - "true" indicates to provide short information about every unique agent in a proposal result set.
        `cfgProvideTeamInfo` - "true" indicates to provide short information about every unique agent's team in a proposal result set.
        `cfgProvideContractInfo` - "true" indicates to provide short information about every unique agent's contract in a proposal result set.
      Returns:
        `SchTradeHolder`
      Throws:
        `java.rmi.RemoteException`
      See Also:
        `ESchTradeStatus`, `ESchTradeSortMode`, `ECfgSortMode.Agent`, `ESchStateLayout`

    - #### openTradeSnapshot

          SchTradeSnapshot openTradeSnapshot(int siteID,
                                           double startDate,
                                           double endDate,
                                           int[] teamIDArray,
                                           int[] agentIDArray,
                                           int[] statusFilter,
                                           int tradeSortMode,
                                           int agentSortMode,
                                           boolean sortAscending)
                                             throws java.rmi.RemoteException

      Creates a snapshot of list of trades on server side that can be accessed later in small portions.
      Parameters:
        `siteID` - Site ID
        `startDate` - Start date of Date window filter
        `endDate` - End date of Date window filter
        `teamIDArray` - Defines filter for agent teams participating in schedule trades. A null value means no team filter.
        `agentIDArray` - Defines filter for agents participating in schedule trades. A null value means no agent filter.
        `statusFilter` - Defines filter for statuses of trades. A null value means "all statuses"
        `tradeSortMode` - Proposal Agent, Response Agent. Proposal Paid Hours, Response Paid Hours, Status or None,
        `agentSortMode` - Agent list sort mode
        `sortAscending` - Sort order
      Returns:
        `SchTradeSnapshot`
      Throws:
        `java.rmi.RemoteException`
      See Also:
        `ESchTradeStatus`, `ESchTradeSortMode`, `ECfgSortMode.Agent`

    - #### fetchTradeFromSnapshot

          SchTradeHolder fetchTradeFromSnapshot(java.lang.String snapshotID,
                                              int firstIndex,
                                              int lastIndex,
                                              int schStateLayout,
                                              boolean schProvideStateInfo,
                                              boolean cfgProvideAgentInfo,
                                              boolean cfgProvideTeamInfo,
                                              boolean cfgProvideContractInfo)
                                                throws java.rmi.RemoteException

      Retrieves a specified range of trades from snapshot.
      Parameters:
        `snapshotID` - Trade snapshot ID
        `firstIndex` - First trade index in snapshot
        `lastIndex` - Last trade index in snapshot
        `schStateLayout` - Defines layout of returned agent day schedule.
        `schProvideStateInfo` - Provide scheduled state info for every unique state in proposal schedules.
        `cfgProvideAgentInfo` - "true" indicates to provide short information about every unique agent in a proposal result set.
        `cfgProvideTeamInfo` - "true" indicates to provide short information about every unique agent's team in a proposal result set.
        `cfgProvideContractInfo` - "true" indicates to provide short information about every unique agent's contract in a proposal result set.
      Returns:
        List of trades and agent info (if requested) `SchTradeHolder`
      Throws:
        `java.rmi.RemoteException`
      See Also:
        `ESchStateLayout`

    - #### sortTradeSnapshot

          void sortTradeSnapshot(java.lang.String snapshotID,
                               int tradeSortMode,
                               int agentSortMode,
                               boolean sortAscending)
                                 throws java.rmi.RemoteException

      Changes trade snapshot sort mode and/or order.
      Parameters:
        `snapshotID` - Trade snapshot ID
        `tradeSortMode` - Proposal Agent, Response Agent. Proposal Paid Hours, Response Paid Hours, Status or None,
        `agentSortMode` - Agent list sort mode
        `sortAscending` - Sort order
      Throws:
        `java.rmi.RemoteException`
      See Also:
        `ESchTradeSortMode`, `ECfgSortMode.Agent`

    - #### postTradeProposal

          SchTradeProposalStatus postTradeProposal(int siteID,
                                                 int agentID,
                                                 double[] dateArray,
                                                 java.lang.String comments)
                                                   throws java.rmi.RemoteException

      A trade proposal is posted to community and is available to all qualifying agents.
      Parameters:
        `siteID` - Site ID
        `agentID` - Agent ID
        `dateArray` - List of dates that schedules agent wants to trade
        `comments` - Comments to proposal
      Returns:
        Newly created proposal ID and status. An invalid status indicates failed operation.
      Throws:
        `java.rmi.RemoteException`

    - #### sendPersonalTradeProposal

          SchTradeProposalStatus sendPersonalTradeProposal(int siteID,
                                                         int agentID,
                                                         int directToAgentID,
                                                         int handshake,
                                                         double[] dateArray,
                                                         java.lang.String comments)
                                                           throws java.rmi.RemoteException

      A trade proposal is sent directly to specified agent. Personal proposal can have one-way or two-way handshake assigned. One-way handshake does not require a response from responding agent. It assumes that proposing agent is aware of responding agent's schedule and is ready to trade upon proposal's acceptation by responding agent. Two-way handshake requires acceptation of response by proposing agent after proposal is accepted by responding agent.
      Parameters:
        `siteID` - Site ID
        `agentID` - An ID of agent sending the proposal
        `directToAgentID` - An ID of agent that should receive a personal proposal
        `handshake` - one-way handshake or two-way handshake
        `dateArray` - List of dates that schedules agent wants to trade
        `comments` - Comments to proposal
      Returns:
        Newly created proposal ID and status. An invalid status indicates failed operation.
      Throws:
        `java.rmi.RemoteException`
      See Also:
        `ESchTradeHandshakeType`

    - #### cancelTradeProposal

          SchTradeProposalStatus cancelTradeProposal(int siteID,
                                                   int agentID,
                                                   int proposalID,
                                                   java.lang.String comments)
                                                     throws java.rmi.RemoteException

      A proposal can be canceled by proposing agent at any time while proposal is in "Open" or "In Review" status. If proposal is canceled, all responses to this proposal are automatically canceled as well. If there is trade pending for this proposal, it is also canceled.
      Parameters:
        `siteID` - Site ID
        `agentID` - An idendifier of agent canceling proposal. Must be the same as an ID of agent that created proposal.
        `proposalID` - ID of proposal to cancel
        `comments` - Comments explaining why proposal was canceled (optional). These comments are appended to the comments field in proposal record and response record (if there is any).
      Returns:
        Trade proposal status
      Throws:
        `java.rmi.RemoteException`

    - #### declineTradeResponse

          SchTradeResponseStatus declineTradeResponse(int siteID,
                                                    int agentID,
                                                    int responseID,
                                                    java.lang.String comments)
                                                      throws java.rmi.RemoteException

      A proposing agent can select to decline response from community to community proposal as well as response from agent responding to personal proposal if two-way handshake was requested. Once accepted, response cannot be declined by proposing agent.
      Parameters:
        `siteID` - Site ID
        `agentID` - An ID of agent declining response. Must be the same as an ID of agent that created proposal.
        `responseID` - ID of response to decline
        `comments` - Comments explaining why response was declined (optional). These comments are appended to the comments field in response record.
      Returns:
        Trade response status
      Throws:
        `java.rmi.RemoteException`

    - #### acceptTradeResponse

          SchTradeProposalStatus acceptTradeResponse(int siteID,
                                                   int agentID,
                                                   int proposalID,
                                                   int responseID,
                                                   java.lang.String comments)
                                                     throws java.rmi.RemoteException

      A response to proposal should be accepted by proposing agent in order to schedule trade to be submitted for approval. An exception to this is personal proposal with one-way handshake. In that case trade is submitted upon acceptation by responding agent.
      Parameters:
        `siteID` - Site ID
        `agentID` - An ID of agent accepting response. Must be the same as an ID of agent that created proposal.
        `proposalID` - An ID of proposal
        `responseID` - An ID of response to proposal
        `comments` - Comments addressed to supervisor (optional). These comments are written to the comments field in trade record.
      Returns:
        Trade proposal status
      Throws:
        `java.rmi.RemoteException`

    - #### acceptTradeProposal

          SchTradeResponseStatus acceptTradeProposal(int siteID,
                                                   int agentID,
                                                   int proposalID,
                                                   java.lang.String comments)
                                                     throws java.rmi.RemoteException

      Acceptation of proposal creates a response record, which goes back to proposing agent for final handshake. An exception to this is personal proposal with one-way handshake. In that case acceptation of proposal by responding agent automatically submits a trade record for approval.
      Parameters:
        `siteID` - Site ID
        `agentID` - An ID of agent accepting trade proposal
        `proposalID` - ID of proposal to accept
        `comments` - Comments addressed to proposing agent. These comments are written to the comments field in response record.
      Returns:
        Newly created response ID and status. An invalid status indicates failed operation.
      Throws:
        `java.rmi.RemoteException`

    - #### declinePersonalTradeProposal

          SchTradeProposalStatus declinePersonalTradeProposal(int siteID,
                                                            int agentID,
                                                            int proposalID,
                                                            java.lang.String comments)
                                                              throws java.rmi.RemoteException

      Responding agent may select to decline personal trade proposal. Community trade proposal cannot be declined by responding agent. Once accepted, personal trade proposal cannot be declined.
      Parameters:
        `siteID` - Site ID
        `agentID` - An ID of agent declining trade proposal
        `proposalID` - ID of proposal to decline
        `comments` - Comments addressed to proposing agent
      Returns:
        Trade response status
      Throws:
        `java.rmi.RemoteException`

    - #### cancelTradeResponse

          SchTradeResponseStatus cancelTradeResponse(int siteID,
                                                   int agentID,
                                                   int responseID,
                                                   java.lang.String comments)
                                                     throws java.rmi.RemoteException

      A response to proposal can be canceled by responding agent at any time while proposal is in "Accept" or "In Review" status. If response is canceled, a corresponding proposal is re-listed (reset to "Open" status) and pending trade (if any) is canceled.
      Parameters:
        `siteID` - Site ID
        `agentID` - An ID of agent canceling response. Must be the same as an ID of agent that accepted proposal.
        `responseID` - ID of response to cancel
        `comments` - Comments explaining why response was canceled (optional). These comments are appended to the comments field in response record.
      Returns:
        Trade response status
      Throws:
        `java.rmi.RemoteException`

    - #### approveTrade

          SchTradeStatus approveTrade(int siteID,
                                    int tradeID,
                                    java.lang.String comments)
                                      throws java.rmi.RemoteException

      A supervisor may approve pending trade.
      Parameters:
        `siteID` - Site ID
        `tradeID` - Trade ID
        `comments` - Comments (optional). These comments are appended to the comments field in trade, proposal and response records.
      Returns:
        Status of trade (Approved, Denied or In Review)
      Throws:
        `java.rmi.RemoteException`
      See Also:
        `ESchTradeStatus`

    - #### declineTrade

          SchTradeStatus declineTrade(int siteID,
                                    int tradeID,
                                    java.lang.String comments)
                                      throws java.rmi.RemoteException

      A supervisor may decline the trade.
      Parameters:
        `siteID` - Site ID
        `tradeID` - Trade ID
        `comments` - Comments explaining why trade was declined (required). These comments are appended to the comments field in trade, proposal and response records. In case of auto-decline, a reason is generated automatically by the system.
      Returns:
        Status of trade (Approved, Denied or In Review)
      Throws:
        `java.rmi.RemoteException`
      See Also:
        `ESchTradeStatus`

    - #### checkTrade

          SchValidationHolder checkTrade(int siteID,
                                       int tradeID)
                                         throws java.rmi.RemoteException

      Checks weather trade would violate any "soft" or "hard" constraints.
      Parameters:
        `siteID` - Site ID
        `tradeID` - Trade ID
      Returns:
        Validation warnings and errors
      Throws:
        `java.rmi.RemoteException`
      See Also:
        `SchValidationHolder`

    - #### getTradeCandidates

          SchCandidate getTradeCandidates(int siteID,
                                        int agentID,
                                        double[] days,
                                        int[] teamIDFilter)
                                          throws java.rmi.RemoteException

      Retrieves list of agents with whom agent trade is possible
      Parameters:
        `siteID` - Site ID
        `agentID` - Agent ID
        `days` - List of dates
        `teamIDFilter` - Team filter, null means "any team"
      Returns:
        `SchCandidate`
      Throws:
        `java.rmi.RemoteException`

    - #### getUnanswered

          SchTradeUnansweredHolder getUnanswered(int siteID,
                                               int agentID,
                                               double startDate,
                                               double endDate)
                                                 throws java.rmi.RemoteException

      Retrieves agent proposals with no response
      Parameters:
        `siteID` - Site ID
        `agentID` - Agent ID
        `startDate` - Start date of Date window filter
        `endDate` - End date of Date window filter
      Returns:
        `SchTradeUnansweredHolder`
      Throws:
        `java.rmi.RemoteException`

    - #### pollNotification

          SchTradeNotification pollNotification(long timestamp,
                                              int siteID,
                                              int[] teamIDArray,
                                              int[] agentIDArray,
                                              double startDate,
                                              double endDate,
                                              int detailsLevel,
                                              int stateLayout,
                                              int[] excludeStates,
                                              boolean provideStateInfo,
                                              boolean provideAgentInfo,
                                              boolean provideTeamInfo,
                                              boolean provideContractInfo)
                                                throws java.rmi.RemoteException

      Polls schedule change notification
      Parameters:
        `timestamp` - A timestamp value to use as a baseline for notifications. A timestamp value to use as a baseline for notifications. A zero value implies current moment and negative value tells server to use last acknowledged timestamp as a baseline.
        `siteID` - Site ID
        `teamIDArray` - Team ID filter. Can be "null" meaning "any team"
        `agentIDArray` - Agent ID filter. Can be null meaning "all agents for specified teams". If teams were not specified - means "all agents".
        `startDate` - Start date of schedule range that needs to be tracked for changes. `OleDateTime`
        `endDate` - End date of schedule range that needs to be tracked for changes. `OleDateTime`
        `detailsLevel` - Notification details level `ESchAuditLevel`
        `stateLayout` - Schedule state layout of returned schedules `ESchStateLayout`
        `excludeStates` - List of schedule state types `ESchStateType` that should be excluded from returned schedule.
        `provideStateInfo` - Specifies to provide schedule state descriptive info or not
        `provideAgentInfo` - Tells whether to provide short agent information about every unique agent in response.
        `provideTeamInfo` - Tells whether to provide short team information about every unique team in response.
        `provideContractInfo` - Tells whether to provide short Contract information about every unique contract in response.
      Returns:
        `SchTradeNotification`
      Throws:
        `java.rmi.RemoteException`

    - #### acknowledgeNotification

          void acknowledgeNotification(int siteID,
                                     long timestamp)
                                       throws java.rmi.RemoteException

      Acknowledges to the server that notification was received and processed. See also `pollNotification(long, int, int[], int[], double, double, int, int, int[], boolean, boolean, boolean, boolean)`.
      Parameters:
        `siteID` - Site ID
        `timestamp` - A timestamp value from `SchTradeNotification` returned by `pollNotification(long, int, int[], int[], double, double, int, int, int[], boolean, boolean, boolean, boolean)`
      Throws:
        `java.rmi.RemoteException`

Copyright © 2005-2016 Genesys Telecommunications Labs, Inc. All Rights Reserved.