1 23 24 package org.infoglue.deliver.applications.databeans; 25 26 31 32 public class CacheEvictionBean 33 { 34 public final static int TRANS_CREATE = 0; 35 public final static int TRANS_UPDATE = 1; 36 public final static int TRANS_DELETE = 2; 37 public final static int PUBLISHING = 10; 38 public final static int DENIED_PUBLISHING = 20; 39 public final static int UNPUBLISHING = 30; 40 41 public final static String TRANS_CREATE_TEXT = "create"; 42 public final static String TRANS_UPDATE_TEXT = "update"; 43 public final static String TRANS_DELETE_TEXT = "delete"; 44 public final static String PUBLISHING_TEXT = "publishing"; 45 public final static String DENIED_PUBLISHING_TEXT = "publishing denied"; 46 public final static String UNPUBLISHING_TEXT = "unpublishing"; 47 48 private String className = null; 49 private String objectId = null; 50 private String objectName = null; 51 private String typeId = null; 52 53 public CacheEvictionBean(String className, String typeId, String objectId, String objectName) 54 { 55 this.className = className; 56 this.typeId = typeId; 57 this.objectId = objectId; 58 this.objectName = objectName; 59 } 60 61 public String getClassName() 62 { 63 return className; 64 } 65 66 public String getObjectId() 67 { 68 return objectId; 69 } 70 71 public String getObjectName() 72 { 73 return objectName; 74 } 75 76 public String getTypeId() 77 { 78 return typeId; 79 } 80 81 public static String getTransactionTypeName(Integer transactionType) 82 { 83 switch (transactionType.intValue()) 84 { 85 case (int) (TRANS_CREATE): 86 return TRANS_CREATE_TEXT; 87 case (TRANS_DELETE): 88 return TRANS_DELETE_TEXT; 89 case (TRANS_UPDATE): 90 return TRANS_UPDATE_TEXT; 91 case (PUBLISHING): 92 return PUBLISHING_TEXT; 93 case (DENIED_PUBLISHING): 94 return DENIED_PUBLISHING_TEXT; 95 } 96 return "unknown - map " + transactionType + " to correct text"; 97 } 98 } | Popular Tags |