Examples of Organization


Examples of com.lgx8.management.entities.Organization

  @RequestMapping("/initmodifyor.do")
  public String initOriganization(HttpServletRequest request,HttpServletResponse response){
    RunTimeUser rtUser = RunTimeUser.getRunTimeUser(request);
    if(rtUser!=null){
      long _oid = rtUser.getOrganizationid();
      Organization or = organizationDao.getOrganizationById(_oid);
      request.setAttribute("organization", or);
      request.setAttribute("user", rtUser);
    }
    return "/management/organization/update_organization";
  }
View Full Code Here

Examples of com.liferay.portal.model.Organization

      WebKeys.THEME_DISPLAY);

    Group group = GroupLocalServiceUtil.getGroup(
      themeDisplay.getScopeGroupId());

    Organization organization =
      OrganizationLocalServiceUtil.getOrganization(group.getClassPK());

    Role role = RoleLocalServiceUtil.getRole(
      themeDisplay.getCompanyId(), "Organization Administrator");

    LinkedHashMap<String, Object> userParams =
      new LinkedHashMap<String, Object>();

    userParams.put(
      "userGroupRole",
      new Long[] {new Long(group.getGroupId()),
      new Long(role.getRoleId())});

    List<User> users = UserLocalServiceUtil.search(
      themeDisplay.getCompanyId(), null, Boolean.TRUE, userParams,
      QueryUtil.ALL_POS, QueryUtil.ALL_POS, (OrderByComparator) null);

    for (User user : users) {
      SocialRequestLocalServiceUtil.addRequest(
        themeDisplay.getUserId(), 0, Organization.class.getName(),
        organization.getOrganizationId(), MembersRequestKeys.ADD_MEMBER,
        StringPool.BLANK, user.getUserId());
    }
  }
View Full Code Here

Examples of com.opengamma.core.organization.Organization

   * @param redCode  the RED code to extract the Obligor from, not null
   * @return the Obligor if found, null otherwise
   */
  @Override
  public Obligor extract(String redCode) {
    Organization organization = _organizationSource.getOrganizationByRedCode(redCode);
    return organization == null ? null : organization.getObligor();
  }
View Full Code Here

Examples of com.pre.entity.base.Organization

    org.setName(obox.getText());
    if(org.getDescription()==null){
      BaseDescription description=new BaseDescription();
      org.setDescription(description);
    }
    Organization organization=organizationManager.findByName(ccombo.getText()).get(0);
    if(obox.getText().equals("")){
      try {
        Messagebox.show("Name is empty!", "Error", Messagebox.YES , null);
      } catch (InterruptedException e) {
       
View Full Code Here

Examples of com.sishuok.es.sys.organization.entity.Organization

        group.setType(GroupType.organization);
        group.setShow(false);
        group.setName("123");
        groupService.save(group);

        Organization organization1 = new Organization();
        organization1.setName("test1");
        Organization organization2 = new Organization();
        organization2.setName("test2");
        organizationService.save(organization1);
        organizationService.save(organization2);

        GroupRelation groupRelation1 = new GroupRelation();
        groupRelation1.setGroupId(group.getId());
        groupRelation1.setOrganizationId(organization1.getId());
        GroupRelation groupRelation2 = new GroupRelation();
        groupRelation2.setGroupId(group.getId());
        groupRelation2.setOrganizationId(organization2.getId());

        groupRelationService.save(groupRelation1);
        groupRelationService.save(groupRelation2);

        Searchable searchable = Searchable.newSearchable();
View Full Code Here

Examples of com.sparc.knappsack.components.entities.Organization

    }

    @Test
    public void testInvalid() {
        Domain domain = new Organization();
        domain.getUuid();

        Mockito.when(domainService.getByUUID(form.getDomainUUID())).thenReturn(null);
        Mockito.when(domainService.getDomainForRegion(form.getRegion())).thenReturn(null);
        Mockito.when(domainRequestService.doesDomainRequestExist(domain.getId(), form.getEmailAddress())).thenReturn(true);

        validator.validate(form, errors);
        assertEquals(errors.getErrorCount(), 10);

        setup();

        Mockito.when(domainService.getByUUID(form.getDomainUUID())).thenReturn(null);
        Mockito.when(domainService.getDomainForRegion(form.getRegion())).thenReturn(null);
        Mockito.when(domainRequestService.doesDomainRequestExist(domain.getId(), form.getEmailAddress())).thenReturn(true);

        validator.validate(form, errors);
        assertEquals(errors.getErrorCount(), 10);
    }
View Full Code Here

Examples of com.vst.model.ext.Organization

    return  res;
  }

  @SuppressWarnings("unchecked")
  public CustomerFormDto getCustomerForForm(Integer customerKey){
    Organization  org = gatewayDao.getCustomer(customerKey);
    if (org==null){
      throw new IllegalArgumentException("Customer with id=" + customerKey +" not found.");
    }
    List<?> countries = getCountryList();
    List<?> provinces = getProvinceListForCountry();
    GeoClassificator ancestor = new GeoClassificator();
    ancestor.setId(org.getAddress().getProvince().getId());
    List<?> cities = getCityListForAncestor(ancestor);
    List<?> contacts = getContactsList(extractKeys(org.getContacts()));

    CustomerFormDto dto = new CustomerFormDto();
    dto.setCities((List<GeoClassificator>) cities);
    dto.setCountries((List<GeoClassificator>) countries);
    dto.setProvincies((List<GeoClassificator>) provinces);
View Full Code Here

Examples of javax.xml.registry.infomodel.Organization

public class ScoutUtil
{
   public static void validateAssociation(Association a, String sourceOrgName)
           throws Exception
   {
      Organization o = (Organization)a.getSourceObject();
      if(o.getName() == null || o.getName().getValue() == null)
        throw new Exception("Source OrgName in association is null");
      if (!o.getName().getValue().equals(sourceOrgName))
      {
         throw new Exception("Invalid Source Org in Association");
      }
      o = (Organization)a.getTargetObject();
      if(o.getName()== null || o.getName().getValue() == null)
         throw new Exception("Target OrgName in association is null");;
      Concept atype = a.getAssociationType();
      if(atype.getName() == null || atype.getName().getValue() ==null)
       throw new Exception("Concept stored in Association" );
   }
View Full Code Here

Examples of javax.xml.registry.infomodel.Organization

  
    public void testSaveOrg() throws JAXRException
    {
        String keyid = "";
        login();
        Organization org = null;
        try
        {
            rs = connection.getRegistryService();

            blm = rs.getBusinessLifeCycleManager();
            Collection orgs = new ArrayList();
            org = createOrganization("JBOSS");

            orgs.add(org);
            BulkResponse br = blm.saveOrganizations(orgs);
            if (br.getStatus() == JAXRResponse.STATUS_SUCCESS)
            {
                if ("true".equalsIgnoreCase(debugProp))
                    System.out.println("Organization Saved");
                Collection coll = br.getCollection();
                Iterator iter = coll.iterator();
                while (iter.hasNext())
                {
                    Key key = (Key) iter.next();
                    keyid = key.getId();
                    if ("true".equalsIgnoreCase(debugProp))
                        System.out.println("Saved Key=" + key.getId());
                    assertNotNull(keyid);
                }//end while
            } else
            {
                System.err.println("JAXRExceptions " +
                        "occurred during save:");
                Collection exceptions = br.getExceptions();
                Iterator iter = exceptions.iterator();
                while (iter.hasNext())
                {
                    Exception e = (Exception) iter.next();
                    System.err.println(e.toString());
                    fail(e.toString());
                }
            }
            checkBusinessExists("JBOSS");
        } catch (JAXRException e)
        {
            log.error("Exception:",e);
            fail(e.getMessage());
        }
        finally
        {
           if(org != null)
           {
              try
              {
                 Key orgkey = org.getKey();
                 if(orgkey != null)
                   this.deleteOrganization(org.getKey());
              }
              catch(Exception e)
              {
                 log.error("Exception in finally:",e);
              }
View Full Code Here

Examples of javax.xml.registry.infomodel.Organization

        try
        {
            getJAXREssentials();
            String orgname = "Jaxr Org";
            Organization org = blm.createOrganization(getIString(orgname));
            Collection orgs = new ArrayList();
            orgs.add(org);
            BulkResponse br = blm.saveOrganizations(orgs);
            if (br.getExceptions() != null)
            {
                fail("Save Organizations failed ");
            }
            orgKeys = br.getCollection();
            Iterator iter = orgKeys.iterator();
            while (iter.hasNext())
            {
                orgKey = (Key) iter.next();
            }


            org = (Organization) bqm.getRegistryObject(orgKey.getId(), LifeCycleManager.ORGANIZATION);

            Service service = blm.createService(serviceName);
            org.addService(service);
            Collection services = new ArrayList();
            services.add(service);
            br = blm.saveServices(services);
            if (br.getExceptions() != null)
            {
                fail("Save Services failed ");
            }
            serviceKeys = br.getCollection();
            iter = serviceKeys.iterator();
            while (iter.hasNext())
            {
                serviceKey = (Key) iter.next();
            }

            service = (Service) bqm.getRegistryObject(serviceKey.getId(), LifeCycleManager.SERVICE);

            //Save some concepts
            Concept testConcept = (Concept) blm.createObject(LifeCycleManager.CONCEPT);
            testConcept.setName(blm.createInternationalString(conceptName));
            Collection concepts = new ArrayList();
            concepts.add(testConcept);
            br = blm.saveConcepts(concepts);
            if (br.getExceptions() != null)
            {
                fail("Save Concepts failed ");
            }
            conceptKeys = br.getCollection();
            iter = conceptKeys.iterator();
            while (iter.hasNext())
            {
                conceptKey = (Key) iter.next();
            }

            testConcept = (Concept) bqm.getRegistryObject(conceptKey.getId(), LifeCycleManager.CONCEPT);
            SpecificationLink sl = blm.createSpecificationLink();
            sl.setSpecificationObject(testConcept);
            ServiceBinding sb = blm.createServiceBinding();
            sb.setDescription(blm.createInternationalString(sbDescription));
            sb.setAccessURI(accessURI);
            sb.addSpecificationLink(sl);
            service.addServiceBinding(sb);
            Collection sbs = new ArrayList();
            sbs.add(sb);
            br = blm.saveServiceBindings(sbs);
            if (br.getExceptions() != null)
            {
                fail("Save ServiceBindings failed ");
            }


            Collection specifications = new ArrayList();
            specifications.add(testConcept);

            br = bqm.findServiceBindings(serviceKey, null, null, specifications);
            sbs = br.getCollection();
            iter = sbs.iterator();
            while (iter.hasNext())
            {
                sb = (ServiceBinding) iter.next();
                Service storedService = sb.getService();
                if (!(storedService.getName().getValue().equals(serviceName)))
                {
                    fail("Error: service name");
                }
                Organization storedOrg = storedService.getProvidingOrganization();
                if (!(storedOrg.getName().getValue().equals(orgname)))
                {
                    fail("Error: unexpected organization name \n");
                }
                if (!(sb.getDescription().getValue().equals(sbDescription)))
                {
                    fail("Error: servicebinding description");
                }
                if (!(sb.getAccessURI().equals(accessURI)))
                {
                    fail("Error: unexpected accessURI name");
                }
            }

            //Lets update the ServiceBinding
            sbs = new ArrayList();
            sb.setAccessURI("http://newURI");
            sbs.add(sb);
            br = blm.saveServiceBindings(sbs);
            br = bqm.findServiceBindings(serviceKey, null, null, specifications);
            sbs = br.getCollection();
            iter = sbs.iterator();
            while (iter.hasNext())
            {
                sb = (ServiceBinding) iter.next();
                Service storedService = sb.getService();
                if (!(storedService.getName().getValue().equals(serviceName)))
                {
                    fail("Error: service name");
                }
                Organization storedOrg = storedService.getProvidingOrganization();
                if (!(storedOrg.getName().getValue().equals(orgname)))
                {
                    fail("Error: unexpected organization name \n");
                }
                if (!(sb.getDescription().getValue().equals(sbDescription)))
                {
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.