Package com.dotmarketing.portlets.chains

Examples of com.dotmarketing.portlets.chains.ChainLink


        throw new DotRuntimeException("Error ocurred trying to compile the link code." , e);
      }
     
        }
   
        ChainLink instance = null;
        try {
       instance = (ChainLink) linksClassLoader.loadClass(linkCode.getClassName()).newInstance();
       instance.setCode(linkCode);
    } catch (ClassNotFoundException e) {
      throw new DotRuntimeException("Unable to load the class for link code id: " + linkCode.getId() + ".", e);
    } catch (InstantiationException e) {
      throw new DotRuntimeException("Unable to load the class for link code id: " + linkCode.getId() + ".", e);
    } catch (IllegalAccessException e) {
View Full Code Here


   
    ArrayList<ChainLink> list = new ArrayList<ChainLink> ();
    List<ChainLinkCode> codes = chainFactory.findAllChainLinkCodes();
   
    for(ChainLinkCode code : codes) {
      ChainLink link =  instanciateChainLink(code.getId());
      list.add(link);
    }
   
    return list;
  }
View Full Code Here

  public List<ChainLink> findChainLinksByKeyword(String keyword) throws DotRuntimeException, DotDataException, DotCacheException {
    ArrayList<ChainLink> list = new ArrayList<ChainLink> ();
    List<ChainLinkCode> codes = chainFactory.findAllChainLinkCodes();
   
    for(ChainLinkCode code : codes) {
      ChainLink link =  instanciateChainLink(code.getId());
      if(link.getDescription().contains(keyword) || link.getTitle().contains(keyword) ||
          link.getCode().getClassName().contains(keyword))
        list.add(link);
    }
   
    return list;
   
View Full Code Here

    boolean isNew = false;
    if(chainLinkId == 0)
      isNew = true;
   
    ChainLink oldChainLink = findChainLinkByClassName(className);
    if(oldChainLink != null && isNew)
      throw new DuplicatedChainLinkException ("Another chain link already exist in the system with the same class name.");
    else if (!isNew && oldChainLink.getCode().getId() != chainLinkId)
      throw new DuplicatedChainLinkException ("Another chain link already exist in the system with the same class name.");
   
    ChainLinkCode lcode;
    if(!isNew) {
      lcode = chainFactory.loadChainLinkCode(chainLinkId);
      lcode.setClassName(className);
      lcode.setCode(code);
      lcode.setLanguage(lang);
    } else {
      lcode = new ChainLinkCode (className, code, lang);
    }

   
    ChainLink ret = instanciateChainLink(lcode);
   
    chainFactory.saveChainLinkCode(lcode);
   
    return ret;
  }
View Full Code Here

TOP

Related Classes of com.dotmarketing.portlets.chains.ChainLink

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.