Package com.dotmarketing.common.model

Examples of com.dotmarketing.common.model.ContentletSearch


                // prefer session setting
                Contentlet second=conAPI.find(cons.get(1).getInode(), user, true);
                if(second.getLanguageId()==sessionLang)
                    idx=1;
            }
            ContentletSearch c = cons.get(idx);
            session.setAttribute(com.dotmarketing.util.WebKeys.HTMLPAGE_LANGUAGE,String.valueOf(conAPI.find(c.getInode(), user, true).getLanguageId()));
            request.setAttribute(WebKeys.WIKI_CONTENTLET, c.getIdentifier());
            request.setAttribute(WebKeys.WIKI_CONTENTLET_INODE, c.getInode());
            request.setAttribute(WebKeys.CLICKSTREAM_IDENTIFIER_OVERRIDE, c.getIdentifier());
            request.setAttribute(WebKeys.WIKI_CONTENTLET_URL, url);
            String[] x = url.split("/");
            for(int i=0;i<x.length;i++){
              if(UtilMethods.isSet(x[i])){
                request.setAttribute("URL_ARG" + i, x[i]);
View Full Code Here


                  // as we need to load contentlets anyway to sort
                  // lets just call pull here
                  List<Contentlet> conts=pull(query, limit, sort, user, tmDate);
                  ret = new ArrayList<ContentletSearch>(conts.size());
                  for(Contentlet cm : conts) {
                      ContentletSearch cs=new ContentletSearch();
                      cs.setInode((String)cm.get("inode"));
                      cs.setIdentifier((String)cm.get("identifier"));
                      ret.add(cs);
                  }  
              }
              else {
                  // normal query
View Full Code Here

        list.setTotalResults(lc.getTotalHits());

        for (SearchHit sh : lc.hits()) {
            try{
                Map<String, Object> hm = new HashMap<String, Object>();
                ContentletSearch conwrapper= new ContentletSearch();
                conwrapper.setIdentifier(sh.field("identifier").getValue().toString());
                conwrapper.setInode(sh.field("inode").getValue().toString());

                list.add(conwrapper);
            }
            catch(Exception e){
                Logger.error(this,e.getMessage(),e);
View Full Code Here

          if(!unique) {
                      if(UtilMethods.isSet(contentlet.getIdentifier())){//DOTCMS-5409
                          Iterator<ContentletSearch> contentletsIter = contentlets.iterator();
                          while (contentletsIter.hasNext()) {
                              ContentletSearch cont = (ContentletSearch) contentletsIter.next();
                                  if(!contentlet.getIdentifier().equalsIgnoreCase(cont.getIdentifier()))
                                  {
                                      cve.addUniqueField(field);
                                      hasError = true;
                                      break;
                                  }
View Full Code Here

TOP

Related Classes of com.dotmarketing.common.model.ContentletSearch

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.