Author: tv
Date: Fri Dec 11 13:43:08 2015
New Revision: 1719416

URL: http://svn.apache.org/viewvc?rev=1719416&view=rev
Log:
Add @Override

Modified:
    
turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/spi/AbstractGroupManager.java
    
turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/spi/AbstractPermissionManager.java
    
turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/spi/AbstractRoleManager.java
    
turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/spi/AbstractUserManager.java

Modified: 
turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/spi/AbstractGroupManager.java
URL: 
http://svn.apache.org/viewvc/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/spi/AbstractGroupManager.java?rev=1719416&r1=1719415&r2=1719416&view=diff
==============================================================================
--- 
turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/spi/AbstractGroupManager.java
 (original)
+++ 
turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/spi/AbstractGroupManager.java
 Fri Dec 11 13:43:08 2015
@@ -46,7 +46,8 @@ public abstract class AbstractGroupManag
      * @throws DataBackendException
      *             if the object could not be instantiated.
      */
-    public <T extends Group> T getGroupInstance() throws DataBackendException
+    @Override
+       public <T extends Group> T getGroupInstance() throws 
DataBackendException
     {
         try
         {
@@ -74,7 +75,8 @@ public abstract class AbstractGroupManag
      * @throws DataBackendException
      *             if the object could not be instantiated.
      */
-    public <T extends Group> T getGroupInstance(String groupName) throws 
DataBackendException
+    @Override
+       public <T extends Group> T getGroupInstance(String groupName) throws 
DataBackendException
     {
         T group = getGroupInstance();
         group.setName(groupName);
@@ -92,7 +94,8 @@ public abstract class AbstractGroupManag
      * @throws UnknownEntityException
      *             if the group does not exist.
      */
-    public <T extends Group> T getGroupByName(String name) throws 
DataBackendException, UnknownEntityException
+    @Override
+       public <T extends Group> T getGroupByName(String name) throws 
DataBackendException, UnknownEntityException
     {
         @SuppressWarnings("unchecked")
                T group = (T) getAllGroups().getByName(name);
@@ -116,7 +119,8 @@ public abstract class AbstractGroupManag
      * @throws DataBackendException
      *             if there is a problem accessing the storage.
      */
-    public <T extends Group> T getGroupById(Object id) throws 
DataBackendException, UnknownEntityException
+    @Override
+       public <T extends Group> T getGroupById(Object id) throws 
DataBackendException, UnknownEntityException
     {
         @SuppressWarnings("unchecked")
                T group = (T) getAllGroups().getById(id);
@@ -138,7 +142,8 @@ public abstract class AbstractGroupManag
      * @throws EntityExistsException
      *             if the group already exists.
      */
-    public synchronized <T extends Group> T addGroup(T group) throws 
DataBackendException, EntityExistsException
+    @Override
+       public synchronized <T extends Group> T addGroup(T group) throws 
DataBackendException, EntityExistsException
     {
         boolean groupExists = false;
         if (StringUtils.isEmpty(group.getName()))
@@ -147,7 +152,7 @@ public abstract class AbstractGroupManag
         }
         if (group.getId() != null)
         {
-            throw new DataBackendException("Could not create a group with an 
id!");
+            throw new DataBackendException("Could not create a group with an 
id of null!");
         }
         groupExists = checkExists(group);
         if (!groupExists)
@@ -173,7 +178,8 @@ public abstract class AbstractGroupManag
      * @throws DataBackendException
      *             if there was an error accessing the data backend.
      */
-    public boolean checkExists(Group group) throws DataBackendException
+    @Override
+       public boolean checkExists(Group group) throws DataBackendException
     {
         return checkExists(group.getName());
     }

Modified: 
turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/spi/AbstractPermissionManager.java
URL: 
http://svn.apache.org/viewvc/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/spi/AbstractPermissionManager.java?rev=1719416&r1=1719415&r2=1719416&view=diff
==============================================================================
--- 
turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/spi/AbstractPermissionManager.java
 (original)
+++ 
turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/spi/AbstractPermissionManager.java
 Fri Dec 11 13:43:08 2015
@@ -47,7 +47,8 @@ public abstract class AbstractPermission
      * @throws UnknownEntityException
      *             if the object could not be instantiated.
      */
-    public <T extends Permission> T getPermissionInstance() throws 
UnknownEntityException
+    @Override
+       public <T extends Permission> T getPermissionInstance() throws 
UnknownEntityException
     {
         try
         {
@@ -74,7 +75,8 @@ public abstract class AbstractPermission
      * @throws UnknownEntityException
      *             if the object could not be instantiated.
      */
-    public <T extends Permission> T getPermissionInstance(String permName) 
throws UnknownEntityException
+    @Override
+       public <T extends Permission> T getPermissionInstance(String permName) 
throws UnknownEntityException
     {
         T perm = getPermissionInstance();
         perm.setName(permName);
@@ -92,7 +94,8 @@ public abstract class AbstractPermission
      * @throws UnknownEntityException
      *             if the permission does not exist.
      */
-    public <T extends Permission> T getPermissionByName(String name) throws 
DataBackendException, UnknownEntityException
+    @Override
+       public <T extends Permission> T getPermissionByName(String name) throws 
DataBackendException, UnknownEntityException
     {
         @SuppressWarnings("unchecked")
                T permission = (T) getAllPermissions().getByName(name);
@@ -116,7 +119,8 @@ public abstract class AbstractPermission
      * @throws DataBackendException
      *             if there is a problem accessing the storage.
      */
-    public <T extends Permission> T getPermissionById(Object id) throws 
DataBackendException, UnknownEntityException
+    @Override
+       public <T extends Permission> T getPermissionById(Object id) throws 
DataBackendException, UnknownEntityException
     {
         @SuppressWarnings("unchecked")
                T permission = (T) getAllPermissions().getById(id);
@@ -138,7 +142,8 @@ public abstract class AbstractPermission
      * @throws EntityExistsException
      *             if the permission already exists.
      */
-    public synchronized <T extends Permission> T addPermission(T permission) 
throws DataBackendException, EntityExistsException
+    @Override
+       public synchronized <T extends Permission> T addPermission(T 
permission) throws DataBackendException, EntityExistsException
     {
         boolean permissionExists = false;
         if (StringUtils.isEmpty(permission.getName()))
@@ -147,7 +152,7 @@ public abstract class AbstractPermission
         }
         if (permission.getId() != null)
         {
-            throw new DataBackendException("Could not create a permission with 
an id!");
+            throw new DataBackendException("Could not create a permission with 
an id of null!");
         }
         try
         {
@@ -161,7 +166,7 @@ public abstract class AbstractPermission
         {
             throw new DataBackendException("addPermission(Permission) failed", 
e);
         }
-        // the only way we could get here without return/throw tirggered
+        // the only way we could get here without return/throw triggered
         // is that the permissionExists was true.
         throw new EntityExistsException("Permission '" + permission + "' 
already exists");
     }
@@ -177,7 +182,8 @@ public abstract class AbstractPermission
      * @throws DataBackendException
      *             if there was an error accessing the data backend.
      */
-    public boolean checkExists(Permission permission) throws 
DataBackendException
+    @Override
+       public boolean checkExists(Permission permission) throws 
DataBackendException
     {
         return checkExists(permission.getName());
     }

Modified: 
turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/spi/AbstractRoleManager.java
URL: 
http://svn.apache.org/viewvc/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/spi/AbstractRoleManager.java?rev=1719416&r1=1719415&r2=1719416&view=diff
==============================================================================
--- 
turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/spi/AbstractRoleManager.java
 (original)
+++ 
turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/spi/AbstractRoleManager.java
 Fri Dec 11 13:43:08 2015
@@ -47,7 +47,8 @@ public abstract class AbstractRoleManage
      * @throws DataBackendException
      *             if the object could not be instantiated.
      */
-    public <T extends Role> T getRoleInstance() throws DataBackendException
+    @Override
+       public <T extends Role> T getRoleInstance() throws DataBackendException
     {
         try
         {
@@ -75,7 +76,8 @@ public abstract class AbstractRoleManage
      * @throws DataBackendException
      *             if the object could not be instantiated.
      */
-    public <T extends Role> T getRoleInstance(String roleName) throws 
DataBackendException
+    @Override
+       public <T extends Role> T getRoleInstance(String roleName) throws 
DataBackendException
     {
         T role = getRoleInstance();
         role.setName(roleName);
@@ -93,7 +95,8 @@ public abstract class AbstractRoleManage
      * @throws UnknownEntityException
      *             if the role does not exist.
      */
-    public <T extends Role> T getRoleByName(String name) throws 
DataBackendException, UnknownEntityException
+    @Override
+       public <T extends Role> T getRoleByName(String name) throws 
DataBackendException, UnknownEntityException
     {
         @SuppressWarnings("unchecked")
                T role = (T) getAllRoles().getByName(name);
@@ -117,7 +120,8 @@ public abstract class AbstractRoleManage
      * @throws DataBackendException
      *             if there is a problem accessing the storage.
      */
-    public <T extends Role> T getRoleById(Object id) throws 
DataBackendException, UnknownEntityException
+    @Override
+       public <T extends Role> T getRoleById(Object id) throws 
DataBackendException, UnknownEntityException
     {
         @SuppressWarnings("unchecked")
                T role = (T) getAllRoles().getById(id);
@@ -139,7 +143,8 @@ public abstract class AbstractRoleManage
      * @throws EntityExistsException
      *             if the role already exists.
      */
-    public synchronized <T extends Role> T addRole(T role) throws 
DataBackendException, EntityExistsException
+    @Override
+       public synchronized <T extends Role> T addRole(T role) throws 
DataBackendException, EntityExistsException
     {
         boolean roleExists = false;
         if (StringUtils.isEmpty(role.getName()))
@@ -148,7 +153,7 @@ public abstract class AbstractRoleManage
         }
         if (role.getId() != null)
         {
-            throw new DataBackendException("Could not create a role with an 
id!");
+            throw new DataBackendException("Could not create a role with an id 
of null!");
         }
         try
         {
@@ -163,7 +168,7 @@ public abstract class AbstractRoleManage
             throw new DataBackendException("addRole(Role) failed", e);
         }
 
-        // the only way we could get here without return/throw tirggered
+        // the only way we could get here without return/throw triggered
         // is that the roleExists was true.
         throw new EntityExistsException("Role '" + role + "' already exists");
     }
@@ -179,7 +184,8 @@ public abstract class AbstractRoleManage
      * @throws DataBackendException
      *             if there was an error accessing the data backend.
      */
-    public boolean checkExists(Role role) throws DataBackendException
+    @Override
+       public boolean checkExists(Role role) throws DataBackendException
     {
         return checkExists(role.getName());
     }

Modified: 
turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/spi/AbstractUserManager.java
URL: 
http://svn.apache.org/viewvc/turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/spi/AbstractUserManager.java?rev=1719416&r1=1719415&r2=1719416&view=diff
==============================================================================
--- 
turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/spi/AbstractUserManager.java
 (original)
+++ 
turbine/fulcrum/trunk/security/api/src/java/org/apache/fulcrum/security/spi/AbstractUserManager.java
 Fri Dec 11 13:43:08 2015
@@ -44,7 +44,8 @@ public abstract class AbstractUserManage
     private ACLFactory aclFactory;
     private Authenticator authenticator;
 
-    public <T extends AccessControlList> T getACL(User user) throws 
UnknownEntityException
+    @Override
+       public <T extends AccessControlList> T getACL(User user) throws 
UnknownEntityException
     {
         return getACLFactory().getAccessControlList(user);
     }
@@ -60,7 +61,8 @@ public abstract class AbstractUserManage
      * @throws DataBackendException
      *             if there was an error accessing the data backend.
      */
-    public boolean checkExists(User user) throws DataBackendException
+    @Override
+       public boolean checkExists(User user) throws DataBackendException
     {
         return checkExists(user.getName());
     }
@@ -82,14 +84,16 @@ public abstract class AbstractUserManage
      * @exception DataBackendException
      *                if there is a problem accessing the storage.
      */
-    public <T extends User> T getUser(String userName, String password) throws 
PasswordMismatchException, UnknownEntityException, DataBackendException
+    @Override
+       public <T extends User> T getUser(String userName, String password) 
throws PasswordMismatchException, UnknownEntityException, DataBackendException
     {
         T user = getUser(userName);
         authenticate(user, password);
         return user;
     }
 
-    public <T extends User> T getUser(String name) throws 
DataBackendException, UnknownEntityException
+    @Override
+       public <T extends User> T getUser(String name) throws 
DataBackendException, UnknownEntityException
     {
         @SuppressWarnings("unchecked")
                T user = (T)getAllUsers().getByName(name);
@@ -113,7 +117,8 @@ public abstract class AbstractUserManage
      * @throws DataBackendException
      *             if there is a problem accessing the storage.
      */
-    public <T extends User> T getUserById(Object id) throws 
DataBackendException, UnknownEntityException
+    @Override
+       public <T extends User> T getUserById(Object id) throws 
DataBackendException, UnknownEntityException
     {
         @SuppressWarnings("unchecked")
                T user = (T)getAllUsers().getById(id);
@@ -140,7 +145,8 @@ public abstract class AbstractUserManage
      * @exception DataBackendException
      *                if there is a problem accessing the storage.
      */
-    public void authenticate(User user, String password) throws 
PasswordMismatchException, UnknownEntityException, DataBackendException
+    @Override
+       public void authenticate(User user, String password) throws 
PasswordMismatchException, UnknownEntityException, DataBackendException
     {
         if (authenticator == null)
         {
@@ -170,7 +176,8 @@ public abstract class AbstractUserManage
      * @exception DataBackendException
      *                if there is a problem accessing the storage.
      */
-    public void changePassword(User user, String oldPassword, String 
newPassword) throws PasswordMismatchException, UnknownEntityException,
+    @Override
+       public void changePassword(User user, String oldPassword, String 
newPassword) throws PasswordMismatchException, UnknownEntityException,
             DataBackendException
     {
         if (!checkExists(user))
@@ -182,7 +189,7 @@ public abstract class AbstractUserManage
             throw new PasswordMismatchException("The supplied old password for 
'" + user.getName() + "' was incorrect");
         }
         user.setPassword(newPassword);
-        // save the changes in the database imediately, to prevent the password
+        // save the changes in the database immediately, to prevent the 
password
         // being 'reverted' to the old value if the user data is lost somehow
         // before it is saved at session's expiry.
         saveUser(user);
@@ -205,7 +212,8 @@ public abstract class AbstractUserManage
      * @exception DataBackendException
      *                if there is a problem accessing the storage.
      */
-    public void forcePassword(User user, String password) throws 
UnknownEntityException, DataBackendException
+    @Override
+       public void forcePassword(User user, String password) throws 
UnknownEntityException, DataBackendException
     {
         if (!checkExists(user))
         {
@@ -228,7 +236,8 @@ public abstract class AbstractUserManage
      * @throws DataBackendException
      *             if the object could not be instantiated.
      */
-    public <T extends User> T getUserInstance() throws DataBackendException
+    @Override
+       public <T extends User> T getUserInstance() throws DataBackendException
     {
         try
         {
@@ -256,7 +265,8 @@ public abstract class AbstractUserManage
      * @throws DataBackendException
      *             if the object could not be instantiated.
      */
-    public <T extends User> T getUserInstance(String userName) throws 
DataBackendException
+    @Override
+       public <T extends User> T getUserInstance(String userName) throws 
DataBackendException
     {
         T user = getUserInstance();
         user.setName(userName);
@@ -276,7 +286,8 @@ public abstract class AbstractUserManage
      * @throws EntityExistsException
      *             if the user account already exists.
      */
-    public <T extends User> T addUser(T user, String password) throws 
DataBackendException, EntityExistsException
+    @Override
+       public <T extends User> T addUser(T user, String password) throws 
DataBackendException, EntityExistsException
     {
         if (StringUtils.isEmpty(user.getName()))
         {


Reply via email to