Package com.liferay.portal.model

Examples of com.liferay.portal.model.Company


    if (configs.size() == 0) {
      String configId = Long.toString(CounterManagerUtil.increment(
        AdminConfig.class.getName()));

      Company company = CompanyManagerUtil.getCompany(companyId);

      shoppingConfig = new ShoppingConfig(
        company.getEmailAddress(), ShoppingConfig.CC_TYPES,
        ShoppingConfig.DEFAULT_CURRENCY_ID,
        GetterUtil.get(
          company.getState(), ShoppingConfig.DEFAULT_TAX_STATE),
        ShoppingConfig.DEFAULT_TAX_RATE,
        ShoppingConfig.DEFAULT_SHIPPING_FORMULA,
        ShoppingConfig.DEFAULT_SHIPPING,
        ShoppingConfig.DEFAULT_ALTERNATIVE_SHIPPING,
        ShoppingConfig.DEFAULT_MIN_ORDER,
View Full Code Here


    if (configs.size() == 0) {
      String configId = Long.toString(CounterManagerUtil.increment(
        AdminConfig.class.getName()));

      Company company = CompanyManagerUtil.getCompany(companyId);

      userConfig = new UserConfig(
        UserConfig.DEFAULT_GROUPS, UserConfig.DEFAULT_ROLES,
        UserConfig.DEFAULT_RESERVED_USER_IDS,
        UserConfig.DEFAULT_RESERVED_USER_EMAIL_ADDRESSES,
View Full Code Here

  private void _updateDefaultUser() throws PortalException, SystemException {
    Iterator itr = CompanyLocalManagerUtil.getCompanies().iterator();

    while (itr.hasNext()) {
      Company company = (Company)itr.next();

//      try {
////        Group generalGroup = GroupLocalManagerUtil.getGroupByName(
////          company.getCompanyId(), "General");
////
View Full Code Here

    if ((contentType != null) && (contentType.startsWith("multipart/form-data"))) {

      req = new UploadServletRequest(req);
    } else if (ParamUtil.get(req, WebKeys.ENCRYPT, false)) {
      try {
        Company company = CompanyLocalManagerUtil.getCompany(companyId);

        req = new EncryptedServletRequest(req, company.getKeyObj());
      } catch (Exception e) {
      }
    }

    // Current URL
View Full Code Here

        CookieUtil.get(req.getCookies(), CookieKeys.PASSWORD);

      if (Validator.isNotNull(autoUserId) &&
        Validator.isNotNull(autoPassword)) {

        Company company = PortalUtil.getCompany(req);

        KeyValuePair kvp = null;
       
        if (company.isAutoLogin()) {
          kvp = UserManagerUtil.decryptUserId(
            company.getCompanyId(), autoUserId, autoPassword);

          credentials = new String[3];

          credentials[0] = kvp.getKey();
          credentials[1] = kvp.getValue();
View Full Code Here

  public void checkCompany(String companyId)
    throws PortalException, SystemException {

    // Company

    Company company = null;

    try {
      company = CompanyUtil.findByPrimaryKey(companyId);
    }
    catch (NoSuchCompanyException nsce) {
      company = CompanyUtil.create(companyId);

      company.setPortalURL("localhost");
      company.setHomeURL("localhost");
      company.setMx(companyId);
      company.setName(companyId);
      company.setShortName(companyId);
      company.setType("biz");
      company.setEmailAddress("test@" + companyId);
      company.setAuthType(Company.AUTH_TYPE_EA);
      company.setAutoLogin(true);
      company.setStrangers(true);

      CompanyUtil.update(company);
    }

    // Key

    checkCompanyKey(companyId);

    // Groups

//    GroupLocalManagerUtil.checkSystemGroups(companyId);

    // Roles

//    RoleLocalManagerUtil.checkSystemRoles(companyId);

    // Default admin
    User defaultUser = createDefaultUser(company);

    if (countUsers(companyId) == 0) {
      Date now = new Date();

      User user = UserLocalManagerUtil.addUser(
        companyId, true, StringPool.BLANK, false, "test", "test", false,
        "Test", StringPool.BLANK, "Test", StringPool.BLANK, true, now,
        "test@" + company.getMx(), defaultUser.getLocale());

      Role adminRole;
      try {
        adminRole = APILocator.getRoleAPI().loadRoleByKey("Administrator");
      } catch (DotDataException e) {
View Full Code Here

  public void checkCompanyKey(String companyId)
    throws PortalException, SystemException {

    try {
      Company company = CompanyUtil.findByPrimaryKey(companyId);

      if (company.getKeyObj() == null) {
        Key key = Encryptor.generateKey();

        company.setKeyObj(Encryptor.generateKey());
      }

      CompanyUtil.update(company);
    }
    catch (EncryptorException ee) {
View Full Code Here

    }
    else if (companyId == null) {
      return null;
    }
    else {
      Company obj = null;
      String key = companyId.toString();

      if (Validator.isNull(key)) {
        return null;
      }
View Full Code Here

    }
    else if (companyId == null) {
      return null;
    }
    else {
      Company obj = null;
      String key = companyId.toString();

      if (Validator.isNull(key)) {
        return null;
      }
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.