1 5 package org.exoplatform.services.portal.model; 6 7 import java.util.* ; 8 14 public class PageNode { 15 protected ArrayList children ; 16 protected String uri ; 17 protected String name ; 18 protected String label ; 19 protected String icon ; 20 protected String viewPermission ; 21 protected String editPermission ; 22 protected List pageReference ; 23 protected String description ; 24 25 public PageNode() { 26 pageReference = new ArrayList(3) ; 27 } 28 29 public String getUri() { return uri ; } 30 public void setUri(String s) { uri = s ; } 31 32 public String getName() { return name ; } 33 public void setName(String s) { name = s ; } 34 35 public String getLabel() { return label ; } 36 public void setLabel(String s) { label = s ; } 37 38 public String getIcon() { return icon ; } 39 public void setIcon(String s) { icon = s ; } 40 41 public String getViewPermission() { return viewPermission ; } 42 public void setViewPermission(String s) { viewPermission = s ; } 43 44 public String getEditPermission() { return editPermission ; } 45 public void setEditPermission(String s) { editPermission = s ; } 46 47 public String getDescription() { return description ; } 48 public void setDescription(String s) { description = s ; } 49 50 public PageReference removePageReference(String type) { 51 for(int i = 0; i < pageReference.size(); i++) { 52 PageReference ref = (PageReference) pageReference.get(i) ; 53 if(type.equals(ref.getType())) { 54 pageReference.remove(i) ; 55 return ref ; 56 } 57 } 58 return null; 59 } 60 61 public PageReference getPageReference(String type) { 62 for(int i = 0; i < pageReference.size(); i++) { 63 PageReference ref = (PageReference) pageReference.get(i) ; 64 if(type.equals(ref.getType())) return ref ; 65 } 66 return null ; 67 } 68 69 public List getClonePageReference() { 70 List list = new ArrayList(3) ; 71 for(int i = 0; i < pageReference.size(); i++) { 72 PageReference pref = (PageReference)pageReference.get(i) ; 73 list.add(new PageReference(pref)) ; 74 } 75 return list ; 76 } 77 78 public List getPageReference() { return pageReference ;} 79 public void setPageReference(List list) { pageReference = list ;} 80 81 public List getChildren() { 82 if(children == null) children = new ArrayList(3) ; 83 return children ; 84 } 85 } | Popular Tags |