Package com.liferay.portal.model

Examples of com.liferay.portal.model.Company


        Iterator<String> it = list.iterator();

        while (it.hasNext()) {
          try {
            String message = (String) it.next();
            Company comp = PublicCompanyFactory.getDefaultCompany();
            mymessages.add(LanguageUtil.get(comp.getCompanyId(), user.getLocale(), message));
          } catch (Exception e) {
          }
        }
        context.put("vmessages", mymessages);
      }
View Full Code Here


                Iterator<String> it = list.iterator();

                while ( it.hasNext() ) {
                    try {
                        String message = (String) it.next();
                        Company comp = PublicCompanyFactory.getDefaultCompany();
                        mymessages.add( LanguageUtil.get( comp.getCompanyId(), backendUser.getLocale(), message ) );
                    } catch ( Exception e ) {
                    }
                }
                context.put( "vmessages", mymessages );
            }
View Full Code Here

  extends PrincipalBean implements CompanyManager {

  // Business methods

  public Company getCompany() throws PortalException, SystemException {
    Company company =
      CompanyUtil.findByPrimaryKey(getUser().getCompanyId());

    return (Company)company.getProtected();
  }
View Full Code Here

  }

  public Company getCompany(String companyId)
    throws PortalException, SystemException {

    Company company = CompanyUtil.findByPrimaryKey(companyId);

    return (Company)company.getProtected();
  }
View Full Code Here

      String city, String state, String zip, String phone, String fax,
      String emailAddress, String authType, boolean autoLogin,
      boolean strangers)
    throws PortalException, SystemException {

    Company company =
      CompanyUtil.findByPrimaryKey(getUser().getCompanyId());

    if (!hasAdministrator(company.getCompanyId())) {
      throw new PrincipalException();
    }

    company.setPortalURL(portalURL);
    company.setHomeURL(homeURL);

    if (GetterUtil.get(
        PropsUtil.get(PropsUtil.MAIL_MX_UPDATE), true)) {

      company.setMx(mx);
    }

    company.setName(name);
    company.setShortName(shortName);
    company.setType(type);
    company.setSize(size);
    company.setStreet(street);
    company.setCity(city);
    company.setState(state);
    company.setZip(zip);
    company.setPhone(phone);
    company.setFax(fax);
    company.setEmailAddress(emailAddress);
    company.setAuthType(authType);
    company.setAutoLogin(autoLogin);
    company.setStrangers(strangers);

    CompanyUtil.update(company);

    return company;
  }
View Full Code Here

  public void updateDefaultUser(
      String languageId, String timeZoneId, String skinId,
      boolean dottedSkins, boolean roundedSkins, String resolution)
    throws PortalException, SystemException {

    Company company =
      CompanyUtil.findByPrimaryKey(getUser().getCompanyId());

    if (!hasAdministrator(company.getCompanyId())) {
      throw new PrincipalException();
    }

    User defaultUser =
      UserLocalManagerUtil.getDefaultUser(company.getCompanyId());

    defaultUser.setLanguageId(languageId);
    defaultUser.setTimeZoneId(timeZoneId);
    defaultUser.setSkinId(skinId);
    defaultUser.setDottedSkins(dottedSkins);
View Full Code Here

  public void updateUser(
      String languageId, String timeZoneId, String skinId,
      boolean dottedSkins, boolean roundedSkins, String resolution, User user)
    throws PortalException, SystemException {

    Company company =
      CompanyUtil.findByPrimaryKey(getUser().getCompanyId());

    if (!hasAdministrator(company.getCompanyId())) {
      throw new PrincipalException();
    }
    user.setLanguageId(languageId);
    user.setTimeZoneId(timeZoneId);
    user.setSkinId(skinId);
View Full Code Here

    if(dottedSkins)
      ds = DbConnectionFactory.getDBTrue();
    if(roundedSkins)
      rs = DbConnectionFactory.getDBTrue();
   
    Company company =
      CompanyUtil.findByPrimaryKey(getUser().getCompanyId());
       try{
      DotConnect dc = new DotConnect();
      dc.setSQL("update user_ set languageid = ?, timezoneid = ?, skinid = ?, dottedskins = " + rs + ", roundedskins = " + ds + ", resolution = ? where companyid = ?");
      dc.addParam(languageId);
      dc.addParam(timeZoneId);
      dc.addParam(skinId);
      dc.addParam(resolution);
      dc.addParam(company.getCompanyId());
      dc.getResult();
    }catch (Exception e) {
      throw new DotRuntimeException(e.getMessage());
    }
 
View Full Code Here

    if (companyId == null) {
      return null;
    }

    Company company = (Company)req.getAttribute(WebKeys.COMPANY);

    if (company == null) {
      company = CompanyLocalManagerUtil.getCompany(companyId);

      req.setAttribute(WebKeys.COMPANY, company);
View Full Code Here

        if (linkExpirationDate.after(new Date())) {
          user.setActive(true);
          APILocator.getUserAPI().save(user, APILocator.getUserAPI().getSystemUser(), false);
   
          //Logging in the user
              Company comp = com.dotmarketing.cms.factories.PublicCompanyFactory.getDefaultCompany();
              if (comp.getAuthType().equals(Company.AUTH_TYPE_EA)) {
                LoginFactory.doLogin(user.getEmailAddress(), user.getPassword(), false, request, response);
              } else {
                LoginFactory.doLogin(user.getUserId(), user.getPassword(), false, request, response);
              }
         
View Full Code Here

TOP

Related Classes of com.liferay.portal.model.Company

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.