Package org.nightlabs.jfire.trade

Examples of org.nightlabs.jfire.trade.TradeManagerRemote


      }
    }

    monitor.beginTask("Loading articles", 1);
    try {
      TradeManagerRemote tradeManager = JFireEjb3Factory.getRemoteBean(TradeManagerRemote.class, SecurityReflector.getInitialContextProperties());
      Collection<Article> articles = CollectionUtil.castCollection(
          tradeManager.getArticles(articleIDs, fetchGroups, maxFetchDepth)
      );

      if (logger.isTraceEnabled()) {
        logger.trace("retrieveJDOObjects: retrieved " + articles.size() + " articles:");
        for (Article article : articles) {
View Full Code Here


      Collection<ArticleID> articleIDs, boolean synchronously,
      boolean get, String[] fetchGroups, int maxFetchDepth, ProgressMonitor monitor
  )
  {
    try {
      TradeManagerRemote tradeManager = JFireEjb3Factory.getRemoteBean(TradeManagerRemote.class, SecurityReflector.getInitialContextProperties());
      Collection<?> c = tradeManager.releaseArticles(
          articleIDs, synchronously,
          get,
          fetchGroups,
          maxFetchDepth
      );
View Full Code Here

      Collection<ArticleID> articleIDs, boolean validate,
      boolean get, String[] fetchGroups, int maxFetchDepth, ProgressMonitor monitor
  )
  {
    try {
      TradeManagerRemote tradeManager = JFireEjb3Factory.getRemoteBean(TradeManagerRemote.class, SecurityReflector.getInitialContextProperties());
      Collection<?> c = tradeManager.deleteArticles(articleIDs, validate, get, fetchGroups, maxFetchDepth);

      if (c == null) {
        for (ArticleID articleID : articleIDs)
          getCache().removeByObjectID(articleID, false);
View Full Code Here

  protected Collection<CustomerGroupMapping> retrieveJDOObjects(
      Set<CustomerGroupMappingID> customerGroupMappingIDs, String[] fetchGroups,
      int maxFetchDepth, ProgressMonitor monitor)
      throws Exception
  {
    TradeManagerRemote tm = tradeManager;
    if (tm == null)
      tm = JFireEjb3Factory.getRemoteBean(TradeManagerRemote.class, SecurityReflector.getInitialContextProperties());

    return tm.getCustomerGroupMappings(customerGroupMappingIDs, fetchGroups, maxFetchDepth);
  }
View Full Code Here

  }

  public CustomerGroupMapping createCustomerGroupMapping(CustomerGroupID localCustomerGroupID, CustomerGroupID partnerCustomerGroupID, boolean get, String[] fetchGroups, int maxFetchDepth, ProgressMonitor monitor)
  {
    try {
      TradeManagerRemote tm = JFireEjb3Factory.getRemoteBean(TradeManagerRemote.class, SecurityReflector.getInitialContextProperties());
      CustomerGroupMapping cgm = tm.createCustomerGroupMapping(localCustomerGroupID, partnerCustomerGroupID, get, fetchGroups, maxFetchDepth);

      if (cgm != null)
        Cache.sharedInstance().put(null, cgm, fetchGroups, maxFetchDepth);

      return cgm;
View Full Code Here

  @Override
  protected Collection<EndCustomerReplicationPolicy> retrieveJDOObjects(
      Set<EndCustomerReplicationPolicyID> endCustomerReplicationPolicyIDs, String[] fetchGroups,
      int maxFetchDepth, ProgressMonitor monitor) throws Exception
  {
    TradeManagerRemote tm = tradeManager;
    if (tm == null)
      tm = JFireEjb3Factory.getRemoteBean(TradeManagerRemote.class, SecurityReflector.getInitialContextProperties());

    return tm.getEndCustomerReplicationPolicies(endCustomerReplicationPolicyIDs, fetchGroups, maxFetchDepth);
  }
View Full Code Here

  @Override
  protected Collection<ArticleEndCustomerHistoryItem> retrieveJDOObjects(
      Set<ArticleEndCustomerHistoryItemID> articleEndCustomerHistoryItemIDs, String[] fetchGroups,
      int maxFetchDepth, ProgressMonitor monitor) throws Exception
  {
    TradeManagerRemote tm = tradeManager;
    if (tm == null)
      tm = JFireEjb3Factory.getRemoteBean(TradeManagerRemote.class, SecurityReflector.getInitialContextProperties());

    return tm.getArticleEndCustomerHistoryItems(articleEndCustomerHistoryItemIDs, fetchGroups, maxFetchDepth);
  }
View Full Code Here

   */
  @Override
  protected Collection<Order> retrieveJDOObjects(Set<OrderID> orderIDs,
      String[] fetchGroups, int maxFetchDepth, ProgressMonitor monitor)
      throws Exception {
    TradeManagerRemote tm = JFireEjb3Factory.getRemoteBean(TradeManagerRemote.class, SecurityReflector.getInitialContextProperties());
    return tm.getOrders(orderIDs, fetchGroups, maxFetchDepth);
  }
View Full Code Here

   */
  public Collection<Order> getOrdersByQueries(
      QueryCollection<? extends AbstractJDOQuery> queries,
      String[] fetchGroups, int maxFetchDepth, ProgressMonitor monitor) {
    try {
      TradeManagerRemote tm  = JFireEjb3Factory.getRemoteBean(TradeManagerRemote.class, SecurityReflector.getInitialContextProperties());
      Set<OrderID> orderIDs = CollectionUtil.castSet(tm.getOrderIDs(queries));

      return getJDOObjects(null, orderIDs, fetchGroups, maxFetchDepth, monitor);
    } catch (Exception e) {
      throw new RuntimeException(
          "Cannot fetch Orders via Queries:" + e.getLocalizedMessage(), e); //$NON-NLS-1$
View Full Code Here

   */
  public List<Order> getOrders(Class<? extends Order> orderClass, boolean subclasses, AnchorID vendorID, AnchorID customerID,
      AnchorID endCustomerID, long rangeBeginIdx, long rangeEndIdx,
      String[] fetchGroups, int maxFetchDepth, ProgressMonitor monitor) {
    try {
      TradeManagerRemote tm = JFireEjb3Factory.getRemoteBean(TradeManagerRemote.class, SecurityReflector.getInitialContextProperties());
      List<OrderID> orderIDList = tm.getOrderIDs(orderClass, subclasses, vendorID, customerID, endCustomerID, rangeBeginIdx, rangeEndIdx);
      Set<OrderID> orderIDs = new HashSet<OrderID>(orderIDList);

      Map<OrderID, Order> orderMap = new HashMap<OrderID, Order>(orderIDs.size());
      for (Order order : getJDOObjects(null, orderIDs, fetchGroups, maxFetchDepth, monitor)) {
        orderMap.put((OrderID) JDOHelper.getObjectId(order), order);
View Full Code Here

TOP

Related Classes of org.nightlabs.jfire.trade.TradeManagerRemote

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.