Package com.liferay.portal.model

Examples of com.liferay.portal.model.Company


    }else{
      req.setAttribute(WebKeys.CONTENT_EDITABLE, false);
    }

    if (contentlet.isArchived()) {
      Company comp = PublicCompanyFactory.getDefaultCompany();
      String message = LanguageUtil.get(comp.getCompanyId(), user.getLocale(), "message.contentlet.edit.deleted");
      SessionMessages.add(req, "custommessage", message);
    }

    //  http://jira.dotmarketing.net/browse/DOTCMS-1073
    //  retrieve file names while edit
View Full Code Here


        String editorName = UtilMethods.getUserFullName(contentlet.getModUser());

        for (Map<String, Object> reference : references) {
          HTMLPage page = (HTMLPage)reference.get("page");
          Host host = hostAPI.findParentHost(page, systemUser, false);
          Company company = PublicCompanyFactory.getDefaultCompany();
          User pageUser = (User)reference.get("owner");

          HashMap<String, Object> parameters = new HashMap<String, Object>();
          parameters.put("from", company.getEmailAddress());
          parameters.put("to", pageUser.getEmailAddress());
          parameters.put("subject", "dotCMS Notification");
          parameters.put("emailTemplate", Config.getStringProperty("CONTENT_CHANGE_NOTIFICATION_EMAIL_TEMPLATE"));
          parameters.put("contentletEditedURL", "http://" + serverName + contentletEditURL);
          parameters.put("contentletTitle", "Content");
View Full Code Here

        String editorName = UtilMethods.getUserFullName(contentlet.getModUser());

        for (Map<String, Object> reference : references) {
          HTMLPage page = (HTMLPage)reference.get("page");
          Host host = hostAPI.findParentHost(page, systemUser, false);
          Company company = PublicCompanyFactory.getDefaultCompany();
          User pageUser = (User)reference.get("owner");

          HashMap<String, Object> parameters = new HashMap<String, Object>();
          parameters.put("from", company.getEmailAddress());
          parameters.put("to", pageUser.getEmailAddress());
          parameters.put("subject", "dotCMS Notification");
          parameters.put("emailTemplate", Config.getStringProperty("CONTENT_CHANGE_NOTIFICATION_EMAIL_TEMPLATE"));
          parameters.put("contentletEditedURL", "http://" + serverName + contentletEditURL);
          parameters.put("contentletTitle", "Content");
View Full Code Here

    Date today = new Date();

    if (user.isNew() || (!user.isNew() && user.getLastLoginDate() == null)) {

      // ### CREATE USER ###
      Company company = PublicCompanyFactory.getDefaultCompany();
      user.setEmailAddress(emailAddress.trim().toLowerCase());
      user.setFirstName(firstName == null ? "" : firstName);
      user.setMiddleName("");
      user.setLastName(lastName == null ? "" : lastName);
      user.setNickName("");
      user.setCompanyId(company.getCompanyId());
      user.setPasswordEncrypted(true);
      user.setGreeting("Welcome, " + user.getFullName() + "!");

      // Set defaults values
      if (user.isNew()) {
View Full Code Here

                        Logger.info(this, "");
                    }
                }
            } else if (_importClass.equals(Company.class)) {
                for (int j = 0; j < l.size(); j++) {
                    Company c = (Company)l.get(j);
                    try {
                        c.setModified(true);
                        CompanyManagerUtil.updateCompany(c);
                    } catch (SystemException e) {
                        throw new DotDataException("Unable to load company",e);
                    }
                }
View Full Code Here

     * @param identifier
     */
    private void appendPermissionError ( List<String> errorsList, User user, String assetType, String assetName, String identifier ) {

        //First we should get the authentication type for this company
        Company company = PublicCompanyFactory.getDefaultCompany();
        String authType = company.getAuthType();

        String userData;
        if ( authType.equals( Company.AUTH_TYPE_ID ) ) {
            userData = user.getUserId();
        } else {
View Full Code Here

    if(UtilMethods.isSet(username) && UtilMethods.isSet(password)) { // providing login and password so let's try to authenticate

      try {

        if(LoginFactory.doLogin(username, password)) {
          Company comp = com.dotmarketing.cms.factories.PublicCompanyFactory.getDefaultCompany();

          if (comp.getAuthType().equals(Company.AUTH_TYPE_EA)) {
            user = APILocator.getUserAPI().loadByUserByEmail(username, APILocator.getUserAPI().getSystemUser(), false);
          } else {
            user = APILocator.getUserAPI().loadUserById(username, APILocator.getUserAPI().getSystemUser(), false);
          }
        } else { // doLogin returning false
View Full Code Here

        try {
            PrincipalThreadLocal.setName( initData.getUser().getUserId() );

            //Getting the current company
            Company currentCompany = PublicCompanyFactory.getDefaultCompany();

            //Set the values
            currentCompany.setPortalURL( portalURL );
            currentCompany.setMx( mx );
            currentCompany.setEmailAddress( emailAddress );
            currentCompany.setSize( size );
            currentCompany.setHomeURL( homeURL );

            //Update the company
            CompanyManagerUtil.updateCompany( currentCompany );

            //And prepare the response
View Full Code Here

        try {
            PrincipalThreadLocal.setName( initData.getUser().getUserId() );

            //Getting the current company
            Company currentCompany = PublicCompanyFactory.getDefaultCompany();

            //Set the values
            currentCompany.setAuthType( authType );

            //Update the company
            CompanyManagerUtil.updateCompany( currentCompany );

            //And prepare the response
View Full Code Here

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

      Company company = CompanyManagerUtil.getCompany(companyId);

      journalConfig = new JournalConfig(
        JournalConfig.DEFAULT_ALLOW_SIMPLE_ARTICLES,
        _getJournalApprovalRequestedEmail(),
        _getJournalApprovalGrantedEmail(),
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.