Package com.dotmarketing.portlets.chains.model

Examples of com.dotmarketing.portlets.chains.model.ChainLinkCode


  }
 
  public ChainLink instanciateChainLink(long linkCodeId) throws DotRuntimeException, DotDataException, DotCacheException {
 
    //Looking for the chain link code using the factory
    ChainLinkCode linkCode = chainFactory.loadChainLinkCode(linkCodeId);
    if(linkCode == null)
      throw new DotRuntimeException("Link code id: " + linkCodeId + ", not found.");

    try {
      return instanciateChainLink(linkCode);
View Full Code Here


    return chainFactory.findAllChains();
  }

  public ChainLink findChainLinkByClassName(String fullyQualifiedClassName) throws DotDataException, DotRuntimeException, ChainLinkCodeCompilationException, DotCacheException {

    ChainLinkCode code = chainFactory.findChainLinkCodeByClassName(fullyQualifiedClassName);
    if(code == null)
      return null;
    return instanciateChainLink(code);

  }
View Full Code Here

    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);
   
View Full Code Here

   
  }

  public ChainLinkCode putChainLinkCode(ChainLinkCode chainLinkCode) throws DotCacheException {
   
    ChainLinkCode oldChainLinkCode = getChainLinkCode(chainLinkCode.getId());
   
    cache.put(String.valueOf(chainLinkCode.getId()), chainLinkCode, chainCodeGroup);
   
    return oldChainLinkCode;
   
View Full Code Here

   
    return oldChain;
  }

  public ChainLinkCode removeChainLinkCode(long chainLinkCodeId) throws DotCacheException {
    ChainLinkCode oldChainLinkCode = getChainLinkCode(chainLinkCodeId);
   
    cache.remove(String.valueOf(chainLinkCodeId), chainCodeGroup);
   
    return oldChainLinkCode;
  }
View Full Code Here

  }

  public ChainLinkCode loadChainLinkCode(long chainLinkCodeId) throws DotDataException, DotCacheException {
    ChainCache cache = CacheLocator.getChainCache();

    ChainLinkCode linkCode = cache.getChainLinkCode(chainLinkCodeId);

    // Not in cache?
    if (linkCode == null) {
      linkCode = findChainLinkCode(chainLinkCodeId);
      cache.putChainLinkCode(linkCode);
View Full Code Here

TOP

Related Classes of com.dotmarketing.portlets.chains.model.ChainLinkCode

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.