Examples of EntitySearchFilter


Examples of com.agiletec.aps.system.common.entity.model.EntitySearchFilter

      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

Examples of com.agiletec.aps.system.common.entity.model.EntitySearchFilter

      throw new ApsSystemException("Error on updating Contact", t);
    }
  }
 
  private boolean checkOwner(String owner, String contactKey) throws ApsSystemException {
    EntitySearchFilter filter = new EntitySearchFilter(CONTACT_OWNER_FILTER_KEY, false, owner, false);
    EntitySearchFilter[] filters = {filter};
    List<String> contactsKeys = this.getContacts(filters);
    return contactsKeys.contains(contactKey);
  }
View Full Code Here

Examples of com.agiletec.aps.system.common.entity.model.EntitySearchFilter

  }
 
  protected EntitySearchFilter[] addOrderFilter(EntitySearchFilter[] filters) {
    IUserProfile prototype = this.getUserProfileManager().getDefaultProfileType();
    if (prototype.getFullNameAttributeName() != null) {
      EntitySearchFilter filterToAdd = new EntitySearchFilter(prototype.getFullNameAttributeName(), true);
      filterToAdd.setOrder(EntitySearchFilter.ASC_ORDER);
      int len = 0;
      if (filters != null) {
        len = filters.length;
      }
      EntitySearchFilter[] newFilters = new EntitySearchFilter[len + 1];
View Full Code Here

Examples of com.agiletec.aps.system.common.entity.model.EntitySearchFilter

      ApsSystemUtils.getLogger().error("Null content mapping by existed channel for content type " + channel.getContentType());
      return new ArrayList<String>();
    }
    try {
      EntitySearchFilter[] searchFilters = this.getEntitySearchFilter(channel, langCode);//this.getEntitySearchFilterDOM().getFilters(channel.getContentType(), channel.getFilters());
      EntitySearchFilter filterToAdd = new EntitySearchFilter(IContentManager.ENTITY_TYPE_CODE_FILTER_KEY, false, channel.getContentType(), false);
      EntitySearchFilter[] entitySearchFilters = addFilter(searchFilters, filterToAdd);

      String[] categories = null;
      if (null != channel.getCategory() && channel.getCategory().trim().length() > 0) {
        categories = new String[] {channel.getCategory()};
View Full Code Here

Examples of com.agiletec.aps.system.common.entity.model.EntitySearchFilter

        calendar.set(Calendar.MINUTE, 0);
        calendar.set(Calendar.SECOND, 1);
        Date startDate = calendar.getTime();
        String DATE_FORMAT = "yyyyMMddHHmmss";
        String formattedDate = DateConverter.getFormattedDate(startDate, DATE_FORMAT);
        EntitySearchFilter filter = new EntitySearchFilter(IContentManager.CONTENT_MODIFY_DATE_FILTER_KEY, false, formattedDate, null);
        filter.setOrder(EntitySearchFilter.DESC_ORDER);
        return filter;
    }
View Full Code Here

Examples of com.agiletec.aps.system.common.entity.model.EntitySearchFilter

  }
 
  private Content getExistingContent(String link, String linkAttributeName, String contentType) throws ApsSystemException {
    Content content = null;
    try {
      EntitySearchFilter linkFilter = new EntitySearchFilter(linkAttributeName, true, link, false);
      linkFilter.setLangCode(this.getDefaultLangCode());
      EntitySearchFilter typeCodeFilter = new EntitySearchFilter(IContentManager.ENTITY_TYPE_CODE_FILTER_KEY, false, contentType, false);
      EntitySearchFilter[] filters = new EntitySearchFilter[]{linkFilter, typeCodeFilter};
      List<String> searchContents  = this.getContentManager().searchId(filters);
      if (null != searchContents && searchContents.size() > 0) {
        String contentId  = (String) searchContents.get(0);
        content = this.getContentManager().loadContent(contentId, true);
View Full Code Here

Examples of com.agiletec.aps.system.common.entity.model.EntitySearchFilter

      this.compareIds(new String[] { "3", "4", "5" }, contacts);
     
      contacts = this._addressBookManager.getAllowedContacts("editorCoach", filters);
      this.compareIds(new String[] { "1", "2", "4" }, contacts);
     
      EntitySearchFilter filter1 = new EntitySearchFilter("email", true, "email", true);
      EntitySearchFilter[] filters1 = new EntitySearchFilter[] {filter1};
      contacts = this._addressBookManager.getAllowedContacts("editorCoach", filters1);
      this.compareIds(new String[] { "1", "2", "4" }, contacts);
     
      EntitySearchFilter filter2 = new EntitySearchFilter("email", true, "email2", true);
      EntitySearchFilter[] filters2 = new EntitySearchFilter[] {filter2};
      contacts = this._addressBookManager.getAllowedContacts("editorCoach", filters2);
      this.compareIds(new String[] { "2", "4" }, contacts);
    } catch (Throwable t) {
      throw t;
View Full Code Here

Examples of com.agiletec.aps.system.common.entity.model.EntitySearchFilter

     
      contacts = this._addressBookSearcherDAO.searchAllowedContacts("editorCoach", filters);
      this.compareIds(new String[] { "1", "2", "4" }, contacts);
     
      filters = new EntitySearchFilter[] {
          new EntitySearchFilter("email", true, "email", true),
      };
      contacts = this._addressBookSearcherDAO.searchAllowedContacts("editorCoach", filters);
      this.compareIds(new String[] { "1", "2", "4" }, contacts);
     
      filters = new EntitySearchFilter[] {
          new EntitySearchFilter("email", true, "email2", true),
      };
      contacts = this._addressBookSearcherDAO.searchAllowedContacts("editorCoach", filters);
      this.compareIds(new String[] { "2", "4" }, contacts);
    } catch (Throwable t) {
      throw t;
View Full Code Here

Examples of com.agiletec.aps.system.common.entity.model.EntitySearchFilter

    this.init();
    this._testHelper.addContentTypeToConfig();
    List<String> groups = new ArrayList<String>();
    groups.add(Group.FREE_GROUP_NAME);
    EntitySearchFilter[] filters = new EntitySearchFilter[1];
    filters[0] = new EntitySearchFilter(IEntityManager.ENTITY_TYPE_CODE_FILTER_KEY, false, "RSS", false);
    List<String> contentsId = _contentManager.loadWorkContentsId(filters, groups);
    assertEquals(0, contentsId.size());
  }
View Full Code Here

Examples of com.agiletec.aps.system.common.entity.model.EntitySearchFilter

  private List<String> getRSSContents() throws ApsSystemException {
    List<String> groups = new ArrayList<String>();
    groups.add(Group.FREE_GROUP_NAME);
    EntitySearchFilter[] filters = new EntitySearchFilter[1];
   
    filters[0] = new EntitySearchFilter(IEntityManager.ENTITY_TYPE_CODE_FILTER_KEY, false, "RSS", false);
    List<String> contentsId = _contentManager.loadWorkContentsId(filters, groups);
    return contentsId;
  }
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.