View Javadoc
1   /*
2    * Copyright (C) 2003-2007 eXo Platform SAS.
3    *
4    * This program is free software; you can redistribute it and/or
5    * modify it under the terms of the GNU Affero General Public License
6    * as published by the Free Software Foundation; either version 3
7    * of the License, or (at your option) any later version.
8    *
9    * This program is distributed in the hope that it will be useful,
10   * but WITHOUT ANY WARRANTY; without even the implied warranty of
11   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12   * GNU General Public License for more details.
13   *
14   * You should have received a copy of the GNU General Public License
15   * along with this program; if not, see<http://www.gnu.org/licenses/>.
16   */
17  package org.exoplatform.services.cms.scripts;
18  
19  import java.util.ArrayList;
20  import java.util.List;
21  
22  import javax.jcr.Node;
23  
24  import org.exoplatform.services.wcm.core.NodeLocation;
25  
26  public class DataTransfer {
27  
28    private String repository_ ;
29    private String workspace_ ;
30    private String path_ ;
31    private NodeLocation node_ ;
32  
33    private List<NodeLocation> contentList_ = new ArrayList<NodeLocation> () ;
34  
35    public DataTransfer() {}
36  
37    public String getRepository() { return this.repository_ ; }
38    public void setRepository(String name) { this.repository_ = name ; }
39  
40    public void setWorkspace( String ws ) { workspace_ = ws ; }
41    public String getWorkspace() { return workspace_ ; }
42  
43    public void setPath( String path ) { path_ = path ; }
44    public String getPath() { return path_ ; }
45  
46    public Node getNode() { 
47      return NodeLocation.getNodeByLocation(node_); 
48    }
49    public void setNode( Node node ) { 
50      node_ = NodeLocation.getNodeLocationByNode(node); 
51    }
52  
53    public List<Node> getContentList() { 
54      return NodeLocation.getNodeListByLocationList(contentList_); 
55    }
56    
57    public void setContentList( List<Node> content ) { 
58      contentList_ = NodeLocation.getLocationsByNodeList(content); 
59    }
60  
61  }