Author: amarkhel
Date: 2009-04-09 11:58:20 -0400 (Thu, 09 Apr 2009)
New Revision: 13476
Modified:
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Album.java
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Image.java
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Shelf.java
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/User.java
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java
Log:
Refactoring
Modified:
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Album.java
===================================================================
---
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Album.java 2009-04-09
15:56:40 UTC (rev 13475)
+++
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Album.java 2009-04-09
15:58:20 UTC (rev 13476)
@@ -343,6 +343,10 @@
image.setVisited(isSetVisited);
}
+ /**
+ * Return relative path of this album in file-system(relative to uploadRoot
parameter)
+ *
+ */
public String getPath(){
if(getShelf() != null && getOwner() != null && getShelf().getPath() !=
null){
return getShelf().getPath() + this.getId().toString() + File.separator;
Modified:
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Image.java
===================================================================
---
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Image.java 2009-04-09
15:56:40 UTC (rev 13475)
+++
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Image.java 2009-04-09
15:58:20 UTC (rev 13476)
@@ -556,6 +556,10 @@
return s.toString();
}
+ /**
+ * Return relative path of this image in file-system(relative to uploadRoot
parameter)
+ *
+ */
public String getFullPath(){
if(getAlbum() != null && getAlbum().getOwner() != null &&
getAlbum().getPath() != null){
return getAlbum().getPath() + this.path;
Modified:
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Shelf.java
===================================================================
---
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Shelf.java 2009-04-09
15:56:40 UTC (rev 13475)
+++
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Shelf.java 2009-04-09
15:58:20 UTC (rev 13476)
@@ -300,6 +300,10 @@
return null;
}
+ /**
+ * Return relative path of this shelf in file-system(relative to uploadRoot
parameter)
+ *
+ */
public String getPath(){
if(getOwner() != null && getOwner().getPath() != null){
return getOwner().getPath() + this.getId().toString() + File.separator;
Modified:
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/User.java
===================================================================
---
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/User.java 2009-04-09
15:56:40 UTC (rev 13475)
+++
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/User.java 2009-04-09
15:58:20 UTC (rev 13476)
@@ -356,6 +356,10 @@
return images;
}
+ /**
+ * Return relative path of folder with user's images in file-system(relative to
uploadRoot parameter)
+ *
+ */
public String getPath(){
if(this.getId() != null){
return File.separator + this.getLogin().toString() + File.separator;
Modified:
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java
===================================================================
---
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java 2009-04-09
15:56:40 UTC (rev 13475)
+++
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java 2009-04-09
15:58:20 UTC (rev 13476)
@@ -51,7 +51,7 @@
/**
* Remove image entity from database
- *@param image - image to delete
+ * @param image - image to delete
*/
public void deleteImage(Image image) {
if(image.getAlbum().getCoveringImage().equals(image)){
@@ -64,7 +64,8 @@
/**
* Synchronize state of image entity with database
- *@param image - image to Synchronize
+ * @param image - image to Synchronize
+ * @param metatagsChanged - boolean value, that indicates is metatags of this image
were changed(add new or delete older)
*/
public void editImage(Image image, boolean metatagsChanged) {
if(metatagsChanged){
Show replies by date