1 15 package org.jahia.data.containers; 16 17 24 25 import java.util.Vector ; 26 27 import org.jahia.exceptions.JahiaException; 28 import java.io.Serializable ; 29 30 31 public class JahiaContainerSubDefinition implements Serializable { 32 33 34 private int ID; 35 private int ctnDefID; 36 private int pageDefID; 37 private String title; 38 private Vector structure; 39 40 41 46 public JahiaContainerSubDefinition( int ID, 47 int ctnDefID, 48 int pageDefID, 49 String title, 50 Vector structure ) 51 throws JahiaException 52 { 53 this.ID = ID; 54 this.ctnDefID = ctnDefID; 55 this.pageDefID = pageDefID; 56 this.title = title; 57 this.structure = structure; 58 } 60 61 66 public JahiaContainerSubDefinition( int ID, 67 int pageDefID, 68 String title, 69 Vector structure ) 70 throws JahiaException 71 { 72 this.ID = ID; 73 this.ctnDefID = 0; 74 this.pageDefID = pageDefID; 75 this.title = title; 76 this.structure = structure; 77 } 79 82 protected JahiaContainerSubDefinition () { 83 84 } 85 86 91 public int getID() { return ID; } 92 public int getCtnDefID() { return ctnDefID; } 93 public int getPageDefID() { return pageDefID; } 94 public String getTitle() { return title; } 95 public Vector getStructure() { return structure; } 96 97 public void setID( int ID ) { this.ID = ID; } 98 public void setTitle( String value ) { this.title = value; } 99 public void setStructure( Vector structure ) { this.structure = structure; } 100 101 102 public void composeStructure( Vector struct ) 103 throws JahiaException 104 { 105 this.structure = new Vector (); 106 if (struct != null) { 107 for (int i=0; i < struct.size(); i++) 108 { 109 this.structure.add( new JahiaContainerStructure( 110 (String )struct.elementAt(i), this.getID(), i, pageDefID ) ); 111 112 } 113 } 114 } 115 117 118 } | Popular Tags |