Examples of OCApp


Examples of com.ipc.oce.OCApp

   * @return OCValueTable В таблице содержатся поля "ОборотДт" и "ОборотКт".
   * @throws JIException
   *             ошибка DCOM
   */
  public OCValueTable getTurnovers(Date startDate, Date endDate, OCChartOfCharacteristicTypesRef subkonto, OCChartOfCharacteristicTypesRef korSubkonto, OCStructure structure, String dimension, String resouces) throws JIException {
    OCApp inst = OCApp.getInstance(getAssociatedSessionID());
    OCArray subkontoArray = null;
    OCArray korSubkontoArray = null;
    if (subkonto != null) {
      subkontoArray = inst.newArray();
      subkontoArray.add(new OCVariant(subkonto));
    }
    if (korSubkonto != null) {
      korSubkontoArray = inst.newArray();
      korSubkontoArray.add(new OCVariant(korSubkonto));
    }
    return getTurnovers(startDate, endDate, subkontoArray, korSubkontoArray, structure, dimension, resouces);
  }
View Full Code Here

Examples of com.ipc.oce.OCApp

   * @return OCValueTable
   * @throws JIException
   *             ошибка обращения к DCOM-серверу
   */
  public OCValueTable getDrCrTurnovers(Date startDate, Date endDate, OCChartOfCharacteristicTypesRef subkontoDr, OCChartOfCharacteristicTypesRef subkontoCr, OCStructure structure, String dimension, String resouces) throws JIException {
    OCApp inst = OCApp.getInstance(getAssociatedSessionID());
    OCArray subkontoDrArray = null;
    OCArray subkontoCrArray = null;
    if (subkontoDr != null) {
      subkontoDrArray = inst.newArray();
      subkontoDrArray.add(new OCVariant(subkontoDr));
    }
    if (subkontoCr != null) {
      subkontoCrArray = inst.newArray();
      subkontoCrArray.add(new OCVariant(subkontoCr));
    }
    return getDrCrTurnovers(startDate, endDate, subkontoDrArray, subkontoCrArray, structure, dimension, resouces);
  }
View Full Code Here

Examples of com.ipc.oce.OCApp

  public Response performQuery(@QueryParam("q") String query, @DefaultValue("20") @QueryParam("mode") String mode) {
    try {
      if (query == null) {
        return Response.status(Status.BAD_REQUEST).build();
      }
      OCApp app = getApplication();
     
      QueryTemplate template = new QueryTemplate(app);
     
      if (LOG.isInfoEnabled()) {
        LOG.info("Query: " + query);
View Full Code Here

Examples of com.ipc.oce.OCApp

   *            Неопределено
   * @return В таблице содержатся поля "ОборотДт" и "ОборотКт".
   * @throws JIException
   */
  public OCValueTable getBalance(Date date, OCChartOfCharacteristicTypesRef ref, OCStructure structure, String dimensions, String resources) throws JIException {
    OCApp inst = OCApp.getInstance(getAssociatedSessionID());
    OCArray refsArray = null;
    if (ref != null) {
      refsArray = inst.newArray();
      refsArray.add(new OCVariant(ref));
    }
    return getBalance(date, refsArray, structure, dimensions, resources);
  }
View Full Code Here

Examples of com.ipc.oce.OCApp

    super(endpoint);
  }


  public void process(Exchange paramExchange) throws Exception {
    OCApp appInstance = ((OCXEEndpoint) getEndpoint()).getApp_instance();
//    if( !(app_instance.ping()) ){
//      // double-checked reconnect
//      synchronized (app_instance) {
//        if(!(app_instance.ping()))
//          app_instance.reconnect();
View Full Code Here

Examples of com.ipc.oce.OCApp

      throw new IllegalStateException("Wrong uuid and object type pair. UUID = " + uuid + ", type = " + objectTypePair );
    }
   
    OCXEEndpoint endpoint = (OCXEEndpoint) exchange.getFromEndpoint();
   
    OCApp app = endpoint.getApp_instance();
   
    OCObject dataObject = app.findDataObject(objectTypePair, uuid);
   
    Message out = exchange.getOut();
   
    OCXDTOSerializer serializer = app.getXDTOSerializer();
    OCXMLWriter writer = app.newXMLWriter();
    writer.setString("UTF-8");
    serializer.writeXML(writer, dataObject);
    out.setBody(writer.close(), String.class);
   
  }
View Full Code Here

Examples of com.ipc.oce.OCApp

 
  @GET
  @Produces("text/xml")
  @Path("{catalogName}")
  public String getCatalog(@PathParam("catalogName") String catalogName) throws IOException, ConfigurationException, JIException {
    OCApp app = getApplication();
    System.out.println(catalogName);
    OCCatalogManager manager = null;
    try {
      manager = app.getCatalogManager(catalogName);
    } catch (JIException e) {
      // TODO тут нужно как-то обрабатывать
      throw e;
    }
    OCCatalogSelection selection = manager.select();
    StringBuffer sb = new StringBuffer(4096);
    OCXDTOSerializer serializer = app.getXDTOSerializer();
    while(selection.next()) {
      OCCatalogObject object = selection.getObject();
      sb.append(serializer.writeXML(object));
    }
    surroundContainersTag(sb);
View Full Code Here

Examples of com.ipc.oce.OCApp

    super();
    dateFormat = new SimpleDateFormat(DATETIME_PATTERN);
  }
 
  private EventManager getEventManager() throws IOException, ConfigurationException, JIException {
    OCApp app = getApplication();
    EventManager manager = new EventManager(app, servletConfig.getInitParameter("tempLogDirectory"));
    return manager;
  }
View Full Code Here

Examples of com.ipc.oce.OCApp

  public Document getLog(@DefaultValue("NULL") @QueryParam("eventType") String eventType, @DefaultValue("INFORMATION") @QueryParam("level")String eventLevel, @PathParam("metaType") String metaType,  @QueryParam("start") String startDate, @QueryParam("end") String endDate) {
    if (eventType.equals("NULL")) {
      eventType = EventManager.EVENT_ALL;
    }
    try {
      OCApp app = getApplication();
      _OCAbstractManager abstractManager = app.findManager(metaType);
      _OCCommonMetadataObject commonMetadataObject = abstractManager.getMetadata();
     
      EventManager manager = getEventManager();
     
      Date sDate = null;
      if (startDate != null) {
        sDate = dateFormat.parse(startDate);
      }
     
      Date eDate = null;
      if (endDate != null) {
        eDate = dateFormat.parse(endDate);
      }
     
      EEventLogLevel logLevel  = app.findVarset(
          EEventLogLevel.class.getSimpleName()
          + "."
          + eventLevel.toUpperCase()
          );
     
View Full Code Here

Examples of com.ipc.oce.OCApp

    if (metaType == null || metaType.trim().length() == 0
        || uuid == null || uuid.trim().length() == 0) {
      throw new WebApplicationException(Status.NOT_ACCEPTABLE);
    }
    try {
      OCApp app = getApplication();
      OCObject obj = app.findDataObject(metaType, uuid);
     
      OCXDTOSerializer serializer = app.getXDTOSerializer();
      OCXMLWriter writer = app.newXMLWriter();
      writer.setString("UTF-8");
     
      serializer.writeXML(writer, obj);
      return writer.close();
     
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.