[jboss-cvs] JBoss Messaging SVN: r3795 - trunk/src/main/org/jboss/messaging/core/security.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Feb 25 14:32:17 EST 2008


Author: timfox
Date: 2008-02-25 14:32:17 -0500 (Mon, 25 Feb 2008)
New Revision: 3795

Added:
   trunk/src/main/org/jboss/messaging/core/security/CheckType.java
Log:
Added missing file from previous commit


Added: trunk/src/main/org/jboss/messaging/core/security/CheckType.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/security/CheckType.java	                        (rev 0)
+++ trunk/src/main/org/jboss/messaging/core/security/CheckType.java	2008-02-25 19:32:17 UTC (rev 3795)
@@ -0,0 +1,55 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+package org.jboss.messaging.core.security;
+
+/**
+ * 
+ * @author Peter Antman
+ * @author <a href="mailto:Scott.Stark at jboss.org">Scott Stark</a>
+ * @version $Revision: 2925 $
+ *
+ * $Id: $
+ */
+public class CheckType
+{
+   public int type;
+   public CheckType(int type)
+   {
+      this.type = type;
+   }      
+   public static final int TYPE_READ = 0;
+   public static final int TYPE_WRITE = 1;
+   public static final int TYPE_CREATE = 2;
+   public static CheckType READ = new CheckType(TYPE_READ);
+   public static CheckType WRITE = new CheckType(TYPE_WRITE);
+   public static CheckType CREATE = new CheckType(TYPE_CREATE);      
+   public boolean equals(Object other)
+   {
+      if (!(other instanceof CheckType)) return false;
+      CheckType ct = (CheckType)other;
+      return ct.type == this.type;
+   }
+   public int hashCode() 
+   {
+      return type;
+   }
+}




More information about the jboss-cvs-commits mailing list