Package nexj.core.scripting

Examples of nexj.core.scripting.PCodeMacro


      contact.setValue("cvector", new char[]{'a', 'b', 'c'});
      contact.setValue("bvector", new byte[]{0, (byte)0xAB, 0x12});
      contact.setValue("svector", new String[]{"a", "b", "c"});
      contact.setValue("vector", new Object[]{"a", "b", "c"});
      contact.setValue("function", new PCodeFunction(new char[]{0, 1, 2}, new Object[]{"abc"}));
      contact.setValue("macro", new PCodeMacro(new char[]{3, 4, 5}, new Object[]{"cde"}, null));

      PrivilegeSet privilegeSet = Repository.getMetadata().createPrivilegeSet();

      privilegeSet.add(Repository.getMetadata().getPrimitivePrivilege("updateContact"));
      privilegeSet.add(Repository.getMetadata().getPrimitivePrivilege("WorkflowManage"));
View Full Code Here


      assertEquals(1, fun.code[1]);
      assertEquals(2, fun.code[2]);
      assertEquals(1, fun.constants.length);
      assertEquals("abc", fun.constants[0]);

      PCodeMacro mac = (PCodeMacro)contact.getValue("macro");

      assertEquals(3, mac.code.length);
      assertEquals(3, mac.code[0]);
      assertEquals(4, mac.code[1]);
      assertEquals(5, mac.code[2]);
View Full Code Here

      contact.setValue("cvector", new char[]{'a', 'b', 'c'});
      contact.setValue("bvector", new byte[]{0, (byte)0xAB, 0x12});
      contact.setValue("svector", new String[]{"a", "b", "c"});
      contact.setValue("vector", new Object[]{"a", "b", "c"});
      contact.setValue("function", new PCodeFunction(new char[]{0, 1, 2}, new Object[]{"abc"}));
      contact.setValue("macro", new PCodeMacro(new char[]{3, 4, 5}, new Object[]{"cde"}, null));

      PrivilegeSet privilegeSet = Repository.getMetadata().createPrivilegeSet();

      privilegeSet.add(Repository.getMetadata().getPrimitivePrivilege("updateContact"));
      privilegeSet.add(Repository.getMetadata().getPrimitivePrivilege("WorkflowManage"));
View Full Code Here

      assertEquals(1, fun.code[1]);
      assertEquals(2, fun.code[2]);
      assertEquals(1, fun.constants.length);
      assertEquals("abc", fun.constants[0]);
     
      PCodeMacro mac = (PCodeMacro)contact.getValue("macro");
     
      assertEquals(3, mac.code.length);
      assertEquals(3, mac.code[0]);
      assertEquals(4, mac.code[1]);
      assertEquals(5, mac.code[2]);
View Full Code Here

TOP

Related Classes of nexj.core.scripting.PCodeMacro

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.