Author: amarkhel
Date: 2009-05-05 04:19:53 -0400 (Tue, 05 May 2009)
New Revision: 14017
Modified:
trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/User.java
trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/service/Constants.java
Log:
Fix RF-7008
Modified:
trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/User.java
===================================================================
---
trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/User.java 2009-05-05
08:19:49 UTC (rev 14016)
+++
trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/User.java 2009-05-05
08:19:53 UTC (rev 14017)
@@ -371,4 +371,22 @@
result = 31 * result + (login != null ? login.hashCode() : 0);
return result;
}
+
+ public boolean hasShelfWithName(String name) {
+ for(Shelf s : getShelves()){
+ if(s.getName().equals(name)){
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public boolean hasAlbumWithName(String name) {
+ for(Album a : getAlbums()){
+ if(a.getName().equals(name)){
+ return true;
+ }
+ }
+ return false;
+ }
}
\ No newline at end of file
Modified:
trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/service/Constants.java
===================================================================
---
trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/service/Constants.java 2009-05-05
08:19:49 UTC (rev 14016)
+++
trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/service/Constants.java 2009-05-05
08:19:53 UTC (rev 14017)
@@ -53,6 +53,8 @@
public static final String USER_DELETED_EVENT = "userDeletedEvent";
//Errors(Internationalization pending)
+ public static final String SAME_ALBUM_EXIST_ERROR = "You already have album with
given name.";
+ public static final String SAME_SHELF_EXIST_ERROR = "You already have shelf with
given name.";
public static final String AVATAR_SAVING_ERROR = "Error while saving avatar to
disk";
public static final String YOU_CAN_T_ADD_IMAGES_TO_THAT_ALBUM_ERROR = "You
can't add images to that album";
public static final String SHELF_RECENTLY_DELETED_ERROR = "This shelf was recently
deleted. Refresh your browser to see actual data.";
Show replies by date