Package com.dotmarketing.portlets.links.model

Examples of com.dotmarketing.portlets.links.model.Link.copy()


    }

    private static Link copyLink ( Link currentLink, Folder parent, Host host ) throws DotDataException, DotStateException, DotSecurityException {

        Link newLink = new Link();
        newLink.copy( currentLink );

        //First lets verify if already exist
        Boolean exist;
        if ( parent != null ) {
            exist = existsLinkWithTitleInFolder( currentLink.getTitle(), parent );
View Full Code Here


      CacheLocator.getNavToolCache().removeNav(folder.getHostId(), folder.getInode());
     
      Identifier ident = APILocator.getIdentifierAPI().find(link);

      Link newLinkVersion = new Link();
      newLinkVersion.copy(link);
      // sets filename for this new file
      newLinkVersion.setTitle(newName);
      newLinkVersion.setFriendlyName(newName);

      if(existsLinkWithTitleInFolder(newName, folder) || link.isLocked())
View Full Code Here

      }catch(DotHibernateException dhe){
        Logger.debug(this.getClass(), dhe.getMessage());
      }
     
      if(oldLink!=null && InodeUtils.isSet(oldLink.getIdentifier())) {
        oldLink.copy(menuLink);
        HibernateUtil.saveOrUpdate(oldLink);
        HibernateUtil.flush();
        menuLink = oldLink;
      } else {
        String existingId=menuLink.getIdentifier();
View Full Code Here

      throw new DotSecurityException("You don't have permission to wirte in the destination folder.");
    }

    Link newLink = new Link();

        newLink.copy(sourceLink);
       
        // translating internal link if internal and different host than the target folder
        if(sourceLink.getLinkType().equals(Link.LinkType.INTERNAL.toString()) &&
                !APILocator.getIdentifierAPI().find(sourceLink).getHostId().equals(destination.getHostId())) {
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.