1 package org.jahia.data.applications; 2 3 import java.util.Comparator ; 4 import java.io.Serializable ; 5 6 13 public class ApplicationBean implements Serializable , Comparator , Cloneable { 14 15 private int ID; 16 private int jahiaID; 17 private String name; 18 private String context; 19 private int visible = 0; 20 private boolean shared = false; 21 private int rights; 22 private String filename = ""; private String desc = ""; 24 25 28 public ApplicationBean( int ID, 29 int jahiaID, 30 String name, 31 String context, 32 int visible, 33 boolean shared, 34 int rights, 35 String filename, 36 String desc 37 ) { 38 setID( ID ); 39 this.jahiaID = jahiaID; 40 this.name = name; 41 this.context = context; 42 this.visible = visible; 43 this.shared = shared; 44 this.rights = rights; 45 this.filename = filename; 46 this.desc = desc; 47 } 49 50 51 55 public int getID() { return ID; } 56 public int getJahiaID() { return jahiaID; } 57 public String getName() { return name; } 58 public String getContext() { return context; } 59 public int getVisibleStatus() { return visible; } 60 public boolean isShared() { return shared; } 61 public int getRights() { return rights; } 62 public String getFilename() { return filename; } 63 public String getdesc() { return desc; } 64 65 public void setID( int ID ) { this.ID = ID; } 66 public void setName( String name ) { this.name = name; } 67 public void setVisible( int visible ) { this.visible = visible; } 68 public void setShared( boolean shared ) { this.shared = shared; } 69 public void setRights( int rights ) { this.rights = rights; } 70 public void setFilename( String filename ) { this.filename = filename; } 71 public void setdesc( String descr ) { this.desc = descr; } 72 73 74 76 83 public int compare(Object c1, Object c2) throws ClassCastException { 84 85 return ((ApplicationBean)c1) 86 .getName().compareToIgnoreCase(((ApplicationBean)c2).getName()); 87 88 } 89 90 public Object clone() { 91 try { 92 return super.clone(); 93 } catch (CloneNotSupportedException cnse) { 94 return null; 96 } 97 } 98 } | Popular Tags |