Package org.openbravo.base.structure

Examples of org.openbravo.base.structure.OrganizationEnabled


      if ((isNew || currentState[i] != previousState[i])
          && !(currentState[i] instanceof Organization)
          && (currentState[i] instanceof BaseOBObject || currentState[i] instanceof HibernateProxy)
          && currentState[i] instanceof OrganizationEnabled) {
        // get the organization from the current state
        final OrganizationEnabled oe = (OrganizationEnabled) currentState[i];
        final Organization o2 = oe.getOrganization();

        if (!obContext.getOrganizationStructureProvider(o1.getClient().getId()).isInNaturalTree(o1,
            o2)) {
          throw new OBSecurityException("Entity " + bob.getIdentifier() + " ("
              + bob.getEntityName() + ") with organization " + o1.getIdentifier()
View Full Code Here


            obContext.getCurrentClient().getId());
        ce.setClient(client);
      }
    }
    if (o instanceof OrganizationEnabled) {
      final OrganizationEnabled oe = (OrganizationEnabled) o;
      // reread the client and organization
      if (oe.getOrganization() == null) {
        final Organization org = SessionHandler.getInstance().find(Organization.class,
            obContext.getCurrentOrganization().getId());
        oe.setOrganization(org);
      }
    }
  }
View Full Code Here

            + " to be set. Check that the xml was created "
            + "with client/organization property export to true");
      }
    }
    if (bob.getEntity().isOrganizationEnabled()) {
      final OrganizationEnabled oe = (OrganizationEnabled) bob;
      if (oe.getOrganization() == null) {
        error("The organization of entity " + bob.getIdentifier()
            + " is not set. For a client data import the organization needs"
            + " to be set. Check that the xml was created "
            + "with client/organization property export to true");
      }
View Full Code Here

            + " eventhough it does not belong to the target client " + getClient().getIdentifier()
            + " but to client " + ce.getClient().getIdentifier());
      }
    }
    if (bob.getEntity().isOrganizationEnabled()) {
      final OrganizationEnabled oe = (OrganizationEnabled) bob;
      if (!oe.getOrganization().getId().equals(getOrganization().getId())) {
        warn(prefix + " entity " + bob.getIdentifier()
            + " eventhough it does not belong to the target organization "
            + getOrganization().getIdentifier() + " but to organization "
            + oe.getOrganization().getIdentifier());
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.openbravo.base.structure.OrganizationEnabled

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.