Package org.martinlaw.bo

Examples of org.martinlaw.bo.Scope


  public void testCaseStatusMaintenanceRouting() throws WorkflowException {
    //testTransactionalRouting("CaseStatusMaintenanceDocument");
    Type status = new Status();
    String statusText = "deadlock";
    status.setName(statusText);
    Scope statusScope = new Scope();
    statusScope.setQualifiedClassName("org.martinlaw.Aclass");
    status.getScope().add(statusScope);
    try {
      testMaintenanceRoutingInitToFinal(getDocTypeName(), status);
      Map<String, Object> params = new HashMap<String, Object>();
      params.put("name", statusText);
View Full Code Here


   * @throws IllegalAccessException
   */
  @Test
  public void testScope_validation()
  throws InstantiationException, IllegalAccessException {
    Scope statusScope = new Scope();
    statusScope.setQualifiedClassName("");
    final String attributeName = "qualifiedClassName";
    getTestUtils().validate(statusScope, 1, attributeName);
   
    statusScope.setQualifiedClassName("org.martinlaw.Aclass");
    getTestUtils().validate(statusScope, 0, attributeName);
  }
View Full Code Here

   
    List<Status> statusList = new ArrayList<Status>(3);
   
    final String statusChristian = "Christian";
    Status status1 = new Status(1l, statusChristian);
    Scope[] scope1 = {new Scope(marriageClassName), new Scope(weddingClassName)};
    status1.setScope(Arrays.asList(scope1));
   
    final String statusFulfld = "Fulfilled";
    Status status2 = new Status(1l, statusFulfld);
    Scope[] scope2 = {new Scope(marriageClassName)};
    status2.setScope(Arrays.asList(scope2));
   
    // status 'good applies to all classes, so leave scope blank
    final String statusGd = "Good";
    Status status3 = new Status(1l, statusGd);
View Full Code Here

      IllegalAccessException {
    // C
    ConsiderationType type = new ConsiderationType();
    String name = "test type";
    type.setName(name);
    Scope scope1 = new Scope();
    scope1.setQualifiedClassName(Matter.class.getCanonicalName());
    type.getScope().add(scope1);
    Scope scope2 = new Scope();
    scope2.setQualifiedClassName(CourtCase.class.getCanonicalName());
    type.getScope().add(scope2);
    getBoSvc().save(type);
    // R
    type.refresh();
    assertEquals("name does not match", name, type.getName());
View Full Code Here

  public void testStatusCRUD() {
    // create
    Status status = new Status();
    status.setName("pending");
    //test scopes
    Scope scope1 = new Scope();
    final String canonicalName1 = Matter.class.getCanonicalName();
    scope1.setQualifiedClassName(canonicalName1);
    status.getScope().add(scope1);
    Scope scope2 = new Scope();
    final String canonicalName2 = Contract.class.getCanonicalName();
    scope2.setQualifiedClassName(canonicalName2);
    status.getScope().add(scope2);
   
    getBoSvc().save(status);
    //refresh
    status.refresh();
View Full Code Here

    type.refresh();
    assertEquals("name does not match", name, type.getName());
    // save scope and see if it can be seen from the base detail/type side
    boolean scopeAdded = false;
    if (ScopedKeyValue.class.isAssignableFrom(getDataObjectClass())) {
      Scope scope = getScopeClass().newInstance();
      final String qualifiedClassName = Matter.class.getCanonicalName();
      scope.setQualifiedClassName(qualifiedClassName);
      scope.setTypeId(type.getId());
      getBoSvc().save(scope);
     
      type.refresh();
      ScopedKeyValue scoped = (ScopedKeyValue)type;
      assertNotNull("scope should not be null", scoped.getScope());
View Full Code Here

TOP

Related Classes of org.martinlaw.bo.Scope

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.