Package com.agiletec.aps.system.common.entity.model.attribute

Examples of com.agiletec.aps.system.common.entity.model.attribute.AttributeInterface


      if (null == this.getI18nManager().getLabelGroup(typeLabelKey)) {
        this.addLabelGroups(typeLabelKey, messageType.getTypeDescr());
      }
      List<AttributeInterface> attributes = messageType.getAttributeList();
      for (int i = 0; i < attributes.size(); i++) {
        AttributeInterface attribute = attributes.get(i);
        String attributeLabelKey = "jpwebdynamicform_" + messageType.getTypeCode() + "_" + attribute.getName();
        if (null == this.getI18nManager().getLabelGroup(attributeLabelKey)) {
          String attributeDescription = attribute.getDescription();
          String value = (null != attributeDescription && attributeDescription.trim().length() > 0)
              ? attributeDescription
              : attribute.getName();
          this.addLabelGroups(attributeLabelKey, value);
        }
      }
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "checkTypeLables");
View Full Code Here


 
  public List<AttributeInterface> getBooleanProfileAttributes() {
    List<AttributeInterface> attributes = new ArrayList<AttributeInterface>();
    List<AttributeInterface> profileAttributes = this.getDefaultProfile().getAttributeList();
    for (int i = 0; i < profileAttributes.size(); i++) {
      AttributeInterface attribute = profileAttributes.get(i);
      if (attribute instanceof BooleanAttribute) {
        attributes.add(attribute);
      }
    }
    return attributes;
View Full Code Here

      if (model != null) {
        this.extractAttributesToEdit(model.getContentShape(), content);
      }
      List<AttributeInterface> attributes = content.getAttributeList();
      for (int i = 0; i < attributes.size(); i++) {
        AttributeInterface attribute = attributes.get(i);
        //jpfrontshortcut_${typeCodeKey}_${attributeNameI18nKey}
        String attributeLabelKey = "jpfrontshortcut_" + content.getTypeCode() + "_" + attribute.getName();
        if (null == this.getI18nManager().getLabelGroup(attributeLabelKey)) {
          this.addLabelGroups(attributeLabelKey, attribute.getName());
        }
        attribute.setDisablingCodes(this.createNewCodes(attribute.getDisablingCodes()));
        if (null != this.getAttributeName() && !this.getAttributeName().contains(attribute.getName())) {
          attribute.disable(JpFrontShortcutSystemConstants.WIDGET_DISABLING_CODE);
        }
      }
      Lang currentLang = super.getCurrentLang();
      this.getRequest().getSession()
          .setAttribute(JpFrontShortcutSystemConstants.CONTENT_LANG_SESSION_PARAM, currentLang);
View Full Code Here

      Collection<String> usernames = new HashSet<String>();
      IUserProfileManager profileManager = this.getUserProfileManager();
      Iterator<IApsEntity> prototypes = profileManager.getEntityPrototypes().values().iterator();
      while (prototypes.hasNext()) {
        IApsEntity prototype = prototypes.next();
        AttributeInterface eMailAttr = prototype.getAttributeByRole(SystemConstants.USER_PROFILE_ATTRIBUTE_ROLE_MAIL);
        if (eMailAttr!=null) {
          EntitySearchFilter[] filters = {
              new EntitySearchFilter(IEntityManager.ENTITY_TYPE_CODE_FILTER_KEY, false, prototype.getTypeCode(), false),
              new EntitySearchFilter(eMailAttr.getName(), true, email, false) };
          usernames.addAll(profileManager.searchId(filters));
        }
      }
      return usernames;
    } catch (Throwable t) {
View Full Code Here

    return langCode;
  }

  private String getFieldValue(IApsEntity entity, String roleName) {
    String value = null;
    AttributeInterface attribute = entity.getAttributeByRole(roleName);
    if (attribute!=null) {
      if (attribute instanceof MonoTextAttribute) {
        value = ((MonoTextAttribute) attribute).getText();
      } else if (attribute instanceof TextAttribute) {
        value = ((TextAttribute) attribute).getTextForLang(this.getLangManager().getDefaultLang().getCode());
View Full Code Here

      return;
    }
    try {
      List<AttributeInterface> attributes = userProfile.getAttributeList();
      for (int i = 0; i < attributes.size(); i++) {
        AttributeInterface attribute = attributes.get(i);
        String attributeLabelKey = "userprofile_" + userProfile.getTypeCode() + "_" + attribute.getName();
        if (null == this.getI18nManager().getLabelGroup(attributeLabelKey)) {
          String attributeDescription = attribute.getDescription();
          String value = (null != attributeDescription && attributeDescription.trim().length() > 0) ?
              attributeDescription :
              attribute.getName();
          this.addLabelGroups(attributeLabelKey, value);
        }
      }
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "checkTypeLables");
View Full Code Here

    }
  }

  public String getEmailAttrName() {
    if (this._emailAttrName==null) {
      AttributeInterface attribute = this.getUserProfile().getAttributeByRole(SystemConstants.USER_PROFILE_ATTRIBUTE_ROLE_MAIL);
      if (attribute!=null) {
        this._emailAttrName = attribute.getName();
      }
    }
    return this._emailAttrName;
  }
View Full Code Here

  private String getVcardFieldValue(IContact contact, String profileAttribute) {
    String attributeValue = "";
    if(contact != null){
      List<AttributeInterface> attributes = contact.getAttributes();
      for (int j = 0; j < attributes.size(); j++) {
        AttributeInterface attribute = attributes.get(j);
        String name = attribute.getName();
        if(name != null && profileAttribute.equals(name.trim())){
          String attributeType = attribute.getType();
          attributeValue = this.getAttributeValue(attribute, attributeType);
        }
      }
    }
    return attributeValue;
View Full Code Here

    try {
      Map<String, IApsEntity> contentTypes = this.getContentManager().getEntityPrototypes();
      Iterator<IApsEntity> contentTypeIter = contentTypes.values().iterator();
      while (contentTypeIter.hasNext()) {
        IApsEntity contentType = contentTypeIter.next();
        AttributeInterface attributeTitle = contentType.getAttributeByRole(JpRssSystemConstants.ATTRIBUTE_ROLE_RSS_CONTENT_TITLE);
        if (null != attributeTitle) {
          RssContentMapping mapping = new RssContentMapping();
          mapping.setContentType(contentType.getTypeCode());
          mapping.setTitleAttributeName(attributeTitle.getName());
          AttributeInterface attributeDescr = contentType.getAttributeByRole(JpRssSystemConstants.ATTRIBUTE_ROLE_RSS_CONTENT_DESCRIPTION);
          if (null != attributeDescr) {
            mapping.setDescriptionAttributeName(attributeDescr.getName());
          }
          mappings.put(contentType.getTypeCode(), mapping);
        }
      }
    } catch (Throwable t) {
View Full Code Here

      return;
    }
    try {
      List<AttributeInterface> attributes = content.getAttributeList();
      for (int i = 0; i < attributes.size(); i++) {
        AttributeInterface attribute = attributes.get(i);
        //jpfastcontentedit_${contentType}_${attributeName}
        String attributeLabelKey = "jpfastcontentedit_" + content.getTypeCode() + "_" + attribute.getName();
        if (null == this.getI18nManager().getLabelGroup(attributeLabelKey)) {
          String attributeDescription = attribute.getDescription();
          String value = (null != attributeDescription && attributeDescription.trim().length() > 0) ?
              attributeDescription :
              attribute.getName();
          this.addLabelGroups(attributeLabelKey, value);
        }
      }
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "checkTypeLables");
View Full Code Here

TOP

Related Classes of com.agiletec.aps.system.common.entity.model.attribute.AttributeInterface

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.