Examples of OCDocumentManager


Examples of com.ipc.oce.objects.OCDocumentManager

    System.out.println(object.getMetadata().getTabularSectionsName());
  }
 
  @Test
  public void showNewObjectsXML() throws JIException {
    OCDocumentManager manager = app.getDocumentManager("ПриемНаРаботуВОрганизацию");
    OCDocumentObject doc = manager.createDocument();
    OCXDTOSerializer serializer = app.getXDTOSerializer();
    OCXMLWriter writer = app.newXMLWriter();
    writer.setString();
    serializer.writeXML(writer, doc);
    System.out.println(writer.close());
View Full Code Here

Examples of com.ipc.oce.objects.OCDocumentManager

  }
 
  @Ignore
  @Test
  public void deleteDoc() throws JIException, ParseException {
    OCDocumentManager manager = app.getDocumentManager("СчетНаОплатуПокупателю");
    OCDocumentRef ref = manager.findByNumber("XXX-000-001", (new SimpleDateFormat("yyyy")).parse("2011"));
    System.out.println("FOR DELTE " + ref.getUUID());
    OCDocumentObject docObj = ref.getObject();
    docObj.delete();
    System.out.println("DELETED");
  }
View Full Code Here

Examples of com.ipc.oce.objects.OCDocumentManager

          System.out.println("Object " + ocObject.toString() + " has error");
        }
       
      });
     
      OCDocumentManager catManager = app.getDocumentManager("Валюты1");
      catManager.emptyRef();
     
    } catch (JIException e) {
     
      e.printStackTrace();
    }
View Full Code Here

Examples of com.ipc.oce.objects.OCDocumentManager

*/
public class GetSomeUUID extends BasicTest {

  @Test
  public void getDocumentUUID() throws JIException {
    OCDocumentManager manager = app.getDocumentManager("СчетНаОплатуПокупателю");
    OCDocumentSelection selection = manager.select();
    selection.next();
    OCDocumentRef ref = selection.getRef();
    System.out.println(ref.getRefFullName() + " " + ref.getUUID().toString());
  }
View Full Code Here

Examples of com.ipc.oce.objects.OCDocumentManager

*/
public class JUXDTO extends BasicTest {

  @Test
  public void object2xmlAndViceversa() throws JIException {
    OCDocumentManager manager = app.getDocumentManager("СчетНаОплатуПокупателю");
    OCDocumentSelection sel = manager.select();
    sel.next();
    OCDocumentObject documentObject = sel.getRef().getObject();
    String originalDocNum = documentObject.getNumberAsString();
    boolean originalIsNew = documentObject.isNew();
   
View Full Code Here

Examples of com.ipc.oce.objects.OCDocumentManager

     * OCStructure structure = app.newStructure(); variant = new
     * OCVariant(structure); o = variant.value(); assertTrue(o instanceof
     * OCStructure);
     */

    OCDocumentManager manager1 = app
        .getDocumentManager("СчетНаОплатуПокупателю");
    OCDocumentSelection selection1 = manager1.select();
    selection1.next();
    OCDocumentRef ref1 = selection1.getRef();
    OCDocumentObject obj1 = ref1.getObject();
    variant = new OCVariant(obj1);
    o = variant.value();
View Full Code Here

Examples of com.ipc.oce.objects.OCDocumentManager

  @Produces("text/xml")
  @Path("doc")
  public Response findDocumentByNumberAndDate(@QueryParam("name")String docName, @QueryParam("num") String number, @QueryParam("date") String sDate, @QueryParam("dateformat") @DefaultValue("dd.MM.yyyy HH:mm:ss") String pattern) throws ParseException, JIException, IOException, ConfigurationException {
    Date date = (new SimpleDateFormat(pattern)).parse(sDate);
    OCApp app = getApplication();
    OCDocumentManager manager = app.getDocumentManager(docName);
    OCDocumentRef ref = manager.findByNumber(number, date);
    if (ref.isEmpty()) {
      return Response.status(Status.NOT_FOUND).build();
    } else {
      OCXDTOSerializer serializer = app.getXDTOSerializer();
     
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.