Author: amarkhel
Date: 2009-02-03 11:00:20 -0500 (Tue, 03 Feb 2009)
New Revision: 12550
Removed:
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/Comment.java
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/FriendshipRequest.java
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/Message.java
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/MetaTag.java
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/Rank.java
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/MessageComparator.java
Modified:
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/Image.java
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/User.java
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/AlbumAction.java
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/IAlbumAction.java
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/IImageAction.java
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/IMessageAction.java
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/IUserAction.java
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/MessageAction.java
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/SearchService.java
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/UserAction.java
trunk/test-applications/realworld/ejb/src/main/resources/import.sql
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileUploadBean.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/AlbumManager.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/Authenticator.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/DnDManager.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/ImageManager.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/MessageManager.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/UserManager.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/AlbumPopupHelper.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/ConfirmationPopupHelper.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/ImagePopupHelper.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/test.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/servlet/PictureServlet.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/ui/History.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/ui/MetaInformationBinder.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ConversationState.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/RenderLogic.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/RenderLogic2.java
trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/faces-config.xml
trunk/test-applications/realworld/web/src/main/webapp/includes/image/imagePreview.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/image/scroller.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/imagePreview.xhtml
Log:
Deleted:
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/Comment.java
===================================================================
---
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/Comment.java 2009-02-03
15:36:56 UTC (rev 12549)
+++
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/Comment.java 2009-02-03
16:00:20 UTC (rev 12550)
@@ -1,109 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-package org.richfaces.realworld.domain;
-
-import java.io.Serializable;
-import java.util.Date;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.FetchType;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-
-import org.hibernate.validator.Length;
-import org.hibernate.validator.NotEmpty;
-import org.hibernate.validator.NotNull;
-import org.jboss.seam.annotations.Name;
-
-@Entity
-@Name("comment")
-@Table(name = "comments")
-public class Comment implements Serializable{
-
- private static final long serialVersionUID = 3429270322123226071L;
-
- @Id
- @GeneratedValue
- @Column(name = "COMMENT_ID")
- private Long id;
-
- @Temporal(TemporalType.TIMESTAMP)
- private Date date;
-
- @ManyToOne
- @JoinColumn(name="IMAGE_COMMENT_ID",
- referencedColumnName="IMAGE_ID")
- private Image image;
-
- @ManyToOne(fetch = FetchType.LAZY)
- @JoinColumn(name = "FROM_USER_ID", nullable = false, updatable = false)
- @org.hibernate.annotations.ForeignKey(name = "FK_FROM_USER_ID")
- private User author;
-
- @Column(length = 1024, nullable = false)
- @NotNull
- @NotEmpty
- @Length(min=2)
- private String message;
-
- public Long getId() {
- return id;
- }
-
- public Date getDate() {
- return date;
- }
-
- public void setDate(Date date) {
- this.date = date;
- }
-
- public User getAuthor() {
- return author;
- }
-
- public void setAuthor(User author) {
- this.author = author;
- }
-
- public String getMessage() {
- return message;
- }
-
- public void setMessage(String message) {
- this.message = message;
- }
-
- public Image getImage() {
- return image;
- }
-
- public void setImage(Image image) {
- this.image = image;
- }
-
-}
Deleted:
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/FriendshipRequest.java
===================================================================
---
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/FriendshipRequest.java 2009-02-03
15:36:56 UTC (rev 12549)
+++
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/FriendshipRequest.java 2009-02-03
16:00:20 UTC (rev 12550)
@@ -1,77 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-package org.richfaces.realworld.domain;
-
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.FetchType;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.Table;
-
-import org.jboss.seam.annotations.Name;
-
-@Entity
-@Name("friendshipRequest")
-@Table(name = "friendship_requests")
-public class FriendshipRequest implements Serializable{
-
- private static final long serialVersionUID = 1218079203119021096L;
-
- @Id
- @GeneratedValue
- @Column(name = "REQUEST_ID")
- private Long id;
-
- @ManyToOne(fetch = FetchType.LAZY)
- @JoinColumn(name = "USER_ID", nullable = false, updatable = false)
- @org.hibernate.annotations.ForeignKey(name = "FK_FROM_USERSFRIEND_ID")
- private User user;
-
- @ManyToOne(fetch = FetchType.EAGER)
- @JoinColumn(name = "FRIEND_ID", nullable = false, updatable = false)
- @org.hibernate.annotations.ForeignKey(name = "FK_FROM_USERSFRIEND2_ID")
- private User friend;
-
- public User getUser() {
- return user;
- }
-
- public void setUser(User user) {
- this.user = user;
- }
-
- public User getFriend() {
- return friend;
- }
-
- public void setFriend(User friend) {
- this.friend = friend;
- }
-
- public Long getId() {
- return id;
- }
-}
Modified:
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/Image.java
===================================================================
---
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/Image.java 2009-02-03
15:36:56 UTC (rev 12549)
+++
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/Image.java 2009-02-03
16:00:20 UTC (rev 12550)
@@ -57,10 +57,6 @@
import org.jboss.seam.annotations.Role;
@NamedQueries({
- @NamedQuery(
- name = "image-tags",
- query = "select distinct t.tag from Image i join i.tags t"
- ),
@NamedQuery(
name = "image-camera",
query = "select distinct i.cameraModel from Image i"
@@ -109,12 +105,8 @@
private int width;
@Temporal(TemporalType.TIMESTAMP)
- private Date uploaded;
+ private Date uploaded;
- @OneToOne(optional=false, cascade = { CascadeType.ALL })
- @JoinColumn(name="RANK_ID")
- private Rank rank;
-
@Column(length = 1024)
@NotNull
@NotEmpty
@@ -126,20 +118,8 @@
@Temporal(TemporalType.TIMESTAMP)
private Date created;
+
- @OneToMany(mappedBy = "parent", cascade = { CascadeType.ALL }, fetch =
FetchType.LAZY)
-
@org.hibernate.annotations.LazyCollection(org.hibernate.annotations.LazyCollectionOption.EXTRA)
- @org.hibernate.annotations.OrderBy(clause = "tag asc")
- private List<MetaTag> tags = new ArrayList<MetaTag>();
-
- @Transient
- private List<MetaTag> meta = new ArrayList<MetaTag>();
-
- @OneToMany(mappedBy = "image", cascade = { CascadeType.ALL }, fetch =
FetchType.LAZY)
-
@org.hibernate.annotations.LazyCollection(org.hibernate.annotations.LazyCollectionOption.EXTRA)
- @org.hibernate.annotations.OrderBy(clause="date asc")
- private List<Comment> comments = new ArrayList<Comment>();
-
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name="IMG_ALBUM_ID",
referencedColumnName="ALBUM_ID")
@@ -239,87 +219,6 @@
return albumName;
}
- public String getMetatagString(Image image){
- StringBuilder s = new StringBuilder();
- for(MetaTag t: image.getTags()){
- s.append(t.getTag());
- s.append(", ");
- }
- return s.toString();
- }
-
- public void setAlbumName(String albumName) {
- this.albumName = albumName;
- }
-
- public List<MetaTag> getTags() {
- return tags;
- }
-
- public void setTags(List<MetaTag> tags) {
- this.tags = tags;
- }
-
- //---------------------------Business methods
-
- public void addMetaTag(MetaTag metaTag) {
- if (metaTag == null) {
- throw new IllegalArgumentException("Null metaTag!");
- }
- if (metaTag.getParent() != null && !this.equals(metaTag.getParent())) {
- metaTag.getParent().getTags().remove(metaTag);
- }
- metaTag.setParent(this);
- tags.add(metaTag);
- }
-
- public void removeMetaTag(MetaTag metaTag) {
- if (metaTag == null) {
- throw new IllegalArgumentException("Null metaTag");
- }
- metaTag.setParent(null);
- tags.remove(metaTag);
- }
-
- public void addComment(Comment comment) {
- if (comment == null) {
- throw new IllegalArgumentException("Null comment!");
- }
- if (comment.getImage() != null && !this.equals(comment.getImage())) {
- comment.getImage().getComments().remove(comment);
- }
- comment.setImage(this);
- comments.add(comment);
- }
-
- public void removeComment(Comment comment) {
- if (comment == null) {
- throw new IllegalArgumentException("Null comment");
- }
- comment.setImage(null);
- comments.remove(comment);
- }
-
- public List<Comment> getComments() {
- return comments;
- }
-
- public Rank getRank() {
- return rank;
- }
-
- public void setRank(Rank rank) {
- this.rank = rank;
- }
-
- public List<MetaTag> getMeta() {
- return meta;
- }
-
- public void setMeta(List<MetaTag> meta) {
- this.meta = meta;
- }
-
public String getCameraModel() {
return cameraModel;
}
@@ -360,12 +259,4 @@
this.uploaded = uploaded;
}
- public boolean containTag(String a) {
- for(MetaTag t :this.getTags()){
- if(t.getTag().equals(a)){
- return true;
- }
- }
- return false;
- }
}
Deleted:
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/Message.java
===================================================================
---
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/Message.java 2009-02-03
15:36:56 UTC (rev 12549)
+++
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/Message.java 2009-02-03
16:00:20 UTC (rev 12550)
@@ -1,159 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-package org.richfaces.realworld.domain;
-
-import java.io.Serializable;
-import java.util.Date;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.FetchType;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-import javax.persistence.Transient;
-
-import org.hibernate.validator.Length;
-import org.hibernate.validator.NotEmpty;
-import org.hibernate.validator.NotNull;
-import org.jboss.seam.annotations.Name;
-@Entity
-@Name("message")
-@Table(name = "messages")
-public class Message implements Serializable{
-
- private static final long serialVersionUID = -2449408843982851550L;
-
- @Id
- @GeneratedValue
- @Column(name = "MESSAGE_ID")
- private Long id;
-
- @Temporal(TemporalType.TIMESTAMP)
- private Date date;
-
- private boolean readed;
-
- private boolean friendshipRequest;
-
- @Transient
- private String ownerLogin;
-
- @Column(length = 256, nullable = false)
- @NotNull
- @NotEmpty
- @Length(min=3)
- private String theme;
-
- @ManyToOne(fetch = FetchType.LAZY)
- @JoinColumn(name = "AUTHOR_ID",nullable = false, updatable = false)
- @org.hibernate.annotations.ForeignKey(name = "FK_FROM_USERS_ID")
- private User author;
-
- @Column(length = 2000, nullable = false)
- @NotNull
- @NotEmpty
- @Length(min=3)
- private String message;
-
- @ManyToOne(fetch = FetchType.EAGER)
- @JoinColumn(name = "OWNER_ID", updatable = false)
- @org.hibernate.annotations.ForeignKey(name = "FK_FROM_USERS2_ID")
- private User owner;
-
- public Long getId() {
- return id;
- }
-
- public Date getDate() {
- return date;
- }
-
- public void setDate(Date date) {
- this.date = date;
- }
-
- public User getAuthor() {
- return author;
- }
-
- public void setAuthor(User author) {
- this.author = author;
- }
-
- public String getMessage() {
- return message;
- }
-
- public void setMessage(String message) {
- this.message = message;
- }
-
- public User getOwner() {
- return owner;
- }
-
- public void setOwner(User owner) {
- this.owner = owner;
- }
-
- public boolean isReaded() {
- return readed;
- }
-
- public void setReaded(boolean readed) {
- this.readed = readed;
- }
-
- public String getTheme() {
- return theme;
- }
-
- public void setTheme(String theme) {
- this.theme = theme;
- }
-
- public boolean isFriendshipRequest() {
- return friendshipRequest;
- }
-
- public void setFriendshipRequest(boolean friendshipRequest) {
- this.friendshipRequest = friendshipRequest;
- }
-
- public String getOwnerLogin() {
- if(ownerLogin == null){
- if(getOwner()!=null){
- ownerLogin = getOwner().getLogin();
- }
- }
- return ownerLogin;
- }
-
- public void setOwnerLogin(String ownerLogin) {
- this.ownerLogin = ownerLogin;
- }
-
-}
Deleted:
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/MetaTag.java
===================================================================
---
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/MetaTag.java 2009-02-03
15:36:56 UTC (rev 12549)
+++
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/MetaTag.java 2009-02-03
16:00:20 UTC (rev 12550)
@@ -1,80 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-package org.richfaces.realworld.domain;
-
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.Table;
-
-import org.hibernate.validator.Length;
-import org.hibernate.validator.NotEmpty;
-import org.hibernate.validator.NotNull;
-import org.jboss.seam.annotations.Name;
-
-@Entity
-@Name("metaTag")
-@Table(name = "metatags")
-public class MetaTag implements Serializable{
-
- private static final long serialVersionUID = -9065024051468971330L;
-
- @Id
- @GeneratedValue
- @Column(name = "METATAG_ID")
- private Long id;
-
- @Column(length = 255, nullable = false)
- @NotNull
- @NotEmpty
- @Length(min=3)
- private String tag;
-
- @ManyToOne
- @JoinColumn(name="IMAGE_METATAG_ID",
- referencedColumnName="IMAGE_ID")
- private Image parent;
-
- public Long getId() {
- return id;
- }
-
- public String getTag() {
- return tag;
- }
-
- public void setTag(String tag) {
- this.tag = tag;
- }
-
- public Image getParent() {
- return parent;
- }
-
- public void setParent(Image image) {
- this.parent = image;
- }
-}
Deleted:
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/Rank.java
===================================================================
---
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/Rank.java 2009-02-03
15:36:56 UTC (rev 12549)
+++
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/Rank.java 2009-02-03
16:00:20 UTC (rev 12550)
@@ -1,93 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-package org.richfaces.realworld.domain;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.OneToOne;
-import javax.persistence.Table;
-
-import org.jboss.seam.annotations.Name;
-
-@Entity
-@Name("rank")
-@Table(name = "Ranks")
-public class Rank implements Serializable{
-
- private static final long serialVersionUID = -3106134752407013128L;
-
- @Id
- @GeneratedValue
- @Column(name = "RANK_ID")
- private Long id;
-
- private Long total;
-
- private Long hits;
-
- @OneToOne(mappedBy = "rank")
- private Image image;
-
- public Long getId() {
- return id;
- }
-
- public Long getTotal() {
- return total;
- }
-
- public void setTotal(Long total) {
- this.total = total;
- }
-
- public Long getHits() {
- return hits;
- }
-
- public void setHits(Long hits) {
- this.hits = hits;
- }
-
- public Image getImage() {
- return image;
- }
-
- public void setImage(Image image) {
- this.image = image;
- }
-
- public double getRating() {
- double total2 = (double)total;
- if(total2 >0 && hits>0){
- double result = total2/hits;
- BigDecimal x = new BigDecimal(result);
- x = x.setScale(2, BigDecimal.ROUND_HALF_UP);
- return x.doubleValue();
- }
- return 0;
- }
-
-}
Modified:
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/User.java
===================================================================
---
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/User.java 2009-02-03
15:36:56 UTC (rev 12549)
+++
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/domain/User.java 2009-02-03
16:00:20 UTC (rev 12550)
@@ -64,29 +64,11 @@
name = "user-availableUsers",
query = "select u.login from User u where u.login like :login"
),
- @NamedQuery(
- name = "user-countMessages",
- query = "SELECT count(u) FROM User u JOIN u.messages mg WHERE u.login=:login
and mg.readed = false"
- ),
- @NamedQuery(
- name = "user-friendExist",
- query = "SELECT count(u) FROM User u JOIN u.friendshipRequests fr WHERE
u.login=:login and fr.friend.login=:friend"
- ),
@NamedQuery(
name = "user-rootAlbums",
query = "from Album a WHERE a.owner.login=:login and a.parent is
null"
),
@NamedQuery(
- name = "user-outcomeMessages",
- query = "from Message m WHERE m.author.login=:login"
- )
- ,
- @NamedQuery(
- name = "user-historyMessages",
- query = "from Message m where m.author =:author and m.owner=:owner"
- )
- ,
- @NamedQuery(
name = "user-user",
query = "from User u where u.login = :login"
)
@@ -161,14 +143,6 @@
@org.hibernate.annotations.OrderBy(clause = "NAME asc")
private List<Album> childAlbums = new ArrayList<Album>();
- @OneToMany(mappedBy = "owner", cascade = { CascadeType.ALL }, fetch =
FetchType.LAZY)
-
@org.hibernate.annotations.LazyCollection(org.hibernate.annotations.LazyCollectionOption.EXTRA)
- @org.hibernate.annotations.OrderBy(clause = "Date desc")
- private List<Message> messages = new ArrayList<Message>();
-
- @OneToMany(mappedBy = "user", cascade = { CascadeType.ALL }, fetch =
FetchType.LAZY)
- private List<FriendshipRequest> friendshipRequests = new
ArrayList<FriendshipRequest>();
-
public String getFirstName() {
return firstName;
}
@@ -253,24 +227,7 @@
friends.remove(friend);
}
- public void addMessage(Message message) {
- if (message == null) {
- throw new IllegalArgumentException("Null Message!");
- }
- if (message.getOwner() != null && !this.equals(message.getOwner())) {
- message.getOwner().getMessages().remove(message);
- }
- message.setOwner(this);
- messages.add(message);
- }
- public void removeMessage(Message message) {
- if (message == null) {
- throw new IllegalArgumentException("Null message");
- }
- message.setOwner(null);
- messages.remove(message);
- }
public String getConfirmPassword() {
return confirmPassword;
@@ -288,40 +245,10 @@
return favoriteAlbums;
}
- public List<Message> getMessages() {
- return messages;
- }
-
- public List<FriendshipRequest> getFriendshipRequests() {
- return friendshipRequests;
- }
-
- public void addFriendshipRequest(User owner) {
- if (getFriendshipRequest(owner, this) != null) {
- return;
- }
- FriendshipRequest request = new FriendshipRequest();
- request.setUser(this);
- request.setFriend(owner);
- this.friendshipRequests.add(request);
- }
-
- public void removeFriendshipRequest(FriendshipRequest request) {
- this.friendshipRequests.remove(request);
- }
-
public void addFriend(User friend) {
this.friends.add(friend);
}
- public FriendshipRequest getFriendshipRequest(User friend, User user) {
- for(FriendshipRequest req: this.friendshipRequests){
- if(req.getUser().getLogin().equals(user.getLogin()) &&
req.getFriend().getLogin().equals(friend.getLogin())){
- return req;
- }
- }
- return null;
- }
public void removeFromFavoriteAlbums(Album album) {
favoriteAlbums.remove(album);
Modified:
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/AlbumAction.java
===================================================================
---
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/AlbumAction.java 2009-02-03
15:36:56 UTC (rev 12549)
+++
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/AlbumAction.java 2009-02-03
16:00:20 UTC (rev 12550)
@@ -38,50 +38,7 @@
@In(value="entityManager")
EntityManager em;
-
- @In @Out
- private User user;
- public void addAlbum(Album album) {
- if(album.getChangedName() != album.getName()){
- album.setName(album.getChangedName());
- }
- em.persist(album);
- user.addAlbum(album);
- em.flush();
- }
-
- public void deleteAlbum(Album album){
- if(album.getParent()!=null){
- album.getParent().removeChildAlbum(album);
- }else{
- user.removeAlbum(album);
- }
- em.flush();
- }
-
- public void editAlbum(Album album){
- em.flush();
- }
-
- public void flush(){
- em.flush();
- }
-
- public void renameAllImagesFromAlbumAndChilds(Album album, String replace,
- String forReplace) {
- for (Image image : album.getImages()) {
- image.setPath(image.getPath().replaceAll(replace, forReplace));
- }
-
- for (Album a : album.getChildAlbums()) {
- String replace2 = replace + Constants.SLASH + a.getName();
- String forReplace2 = forReplace + Constants.SLASH + a.getName();
- renameAllImagesFromAlbumAndChilds(a, replace2, forReplace2);
- }
- em.flush();
- }
-
public List<Album> getSharedAlbums() {
return em.createQuery("from Album a where a.shared=true").getResultList();
}
Modified:
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/IAlbumAction.java
===================================================================
---
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/IAlbumAction.java 2009-02-03
15:36:56 UTC (rev 12549)
+++
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/IAlbumAction.java 2009-02-03
16:00:20 UTC (rev 12550)
@@ -29,17 +29,6 @@
@Local
public interface IAlbumAction {
- public abstract void addAlbum(Album album);
-
- public void deleteAlbum(Album album);
-
- public void editAlbum(Album album);
-
- public abstract void flush();
-
- public abstract void renameAllImagesFromAlbumAndChilds(Album dragValue,
- String albumOld, String albumNew);
-
public abstract List<Album> getSharedAlbums();
}
\ No newline at end of file
Modified:
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/IImageAction.java
===================================================================
---
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/IImageAction.java 2009-02-03
15:36:56 UTC (rev 12549)
+++
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/IImageAction.java 2009-02-03
16:00:20 UTC (rev 12550)
@@ -22,7 +22,6 @@
import javax.ejb.Local;
-import org.richfaces.realworld.domain.Comment;
import org.richfaces.realworld.domain.Image;
@Local
@@ -30,16 +29,5 @@
public abstract void deleteImage(Image image);
- public abstract void editImage(Image image, boolean parentChanged);
- public abstract void addImage(Image image);
-
- public void deleteComment(Comment comment);
-
- public void addComment(Comment comment);
-
- public abstract void editComment(Comment comment);
-
- public abstract void vote(Image image, Long value);
-
}
\ No newline at end of file
Modified:
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/IMessageAction.java
===================================================================
---
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/IMessageAction.java 2009-02-03
15:36:56 UTC (rev 12549)
+++
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/IMessageAction.java 2009-02-03
16:00:20 UTC (rev 12550)
@@ -22,17 +22,10 @@
import javax.ejb.Local;
-import org.richfaces.realworld.domain.Message;
import org.richfaces.realworld.domain.User;
@Local
public interface IMessageAction {
-
- public abstract void sendMessage(Message message);
-
- public abstract void deleteMessage(Message message);
-
- public void markAsReaded(Message message);
public long countNotReadedMessages(User user);
}
\ No newline at end of file
Modified:
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/IUserAction.java
===================================================================
---
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/IUserAction.java 2009-02-03
15:36:56 UTC (rev 12549)
+++
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/IUserAction.java 2009-02-03
16:00:20 UTC (rev 12550)
@@ -25,11 +25,11 @@
import javax.ejb.Local;
import org.richfaces.realworld.domain.Album;
-import org.richfaces.realworld.domain.FriendshipRequest;
import org.richfaces.realworld.domain.Image;
-import org.richfaces.realworld.domain.Message;
import org.richfaces.realworld.domain.User;
+import com.sun.corba.se.impl.protocol.giopmsgheaders.Message;
+
@Local
public interface IUserAction {
public User login(String username, String password);
@@ -40,13 +40,10 @@
public List<String> getUsers(String suggest);
public void removeFromFriends(User owner, User removed);
public boolean friendExist(User user, User friend);
- public void addFriend(User user, User friend, FriendshipRequest request);
public void removeFromFavoriteAlbums(User user, Album album);
public void addFavoriteAlbum(Album album);
public void loginAnonymous();
public List<Album> getRootAlbums(User user);
- public List<Message> getHistory(User historyUser);
- public List<Message> getOutgoingMessages();
public void addFavoriteImage(Image image);
public void removeFromFavoriteImages(User user, Image image);
}
\ No newline at end of file
Modified:
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java
===================================================================
---
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java 2009-02-03
15:36:56 UTC (rev 12549)
+++
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java 2009-02-03
16:00:20 UTC (rev 12550)
@@ -25,8 +25,6 @@
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
-import org.richfaces.realworld.domain.Album;
-import org.richfaces.realworld.domain.Comment;
import org.richfaces.realworld.domain.Image;
@Name("imageAction")
@@ -41,7 +39,7 @@
em.flush();
}
- public void editImage(Image image, boolean parentChanged) {
+/* public void editImage(Image image, boolean parentChanged) {
if(parentChanged){
Album albumPrevious = image.getAlbum();
String login = albumPrevious.getOwner().getLogin();
@@ -53,33 +51,30 @@
image.getTags().clear();
image.setTags(image.getMeta());
em.flush();
- }
+ }*/
- public void addImage(Image image) {
+/* public void addImage(Image image) {
em.persist(image);
image.getAlbum().addImage(image);
image.getTags().clear();
image.setTags(image.getMeta());
em.flush();
- }
+ }*/
- public void deleteComment(Comment comment){
+/* public void deleteComment(Comment comment){
comment.getImage().removeComment(comment);
em.flush();
- }
+ }*/
- public void addComment(Comment comment){
+/* public void addComment(Comment comment){
comment.getImage().addComment(comment);
em.flush();
- }
+ }*/
- public void editComment(Comment comment) {
- em.flush();
- }
- public void vote(Image image, Long value) {
+/* public void vote(Image image, Long value) {
image.getRank().setHits(image.getRank().getHits() + 1);
image.getRank().setTotal(value += image.getRank().getTotal());
em.flush();
- }
+ }*/
}
Modified:
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/MessageAction.java
===================================================================
---
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/MessageAction.java 2009-02-03
15:36:56 UTC (rev 12549)
+++
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/MessageAction.java 2009-02-03
16:00:20 UTC (rev 12550)
@@ -25,8 +25,6 @@
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Observer;
-import org.richfaces.realworld.domain.Message;
import org.richfaces.realworld.domain.User;
@Name("messageAction")
@@ -36,22 +34,8 @@
@In(value="entityManager")
EntityManager em;
- @Observer(Constants.SEND_MESSAGE_EVENT)
- public void sendMessage(Message message){
- if(message.getOwnerLogin() != null){
- User user = (User)em.createNamedQuery(Constants.USER_USER_QUERY)
- .setParameter(Constants.LOGIN_PARAMETER, message.getOwnerLogin())
- .getSingleResult();
- message.setOwner(user);
- message.setOwnerLogin(null);
- }
- if(message.isFriendshipRequest()){
- message.getAuthor().addFriendshipRequest(message.getOwner());
- }
- em.persist(message);
- em.flush();
- }
+
public long countNotReadedMessages(User user){
Long result = (Long)em.createNamedQuery(Constants.USER_COUNT_MESSAGES_QUERY)
.setParameter(Constants.LOGIN_PARAMETER, user.getLogin())
@@ -59,14 +43,5 @@
return result;
}
- public void deleteMessage(Message message){
- em.remove(message);
- message.getOwner().removeMessage(message);
- em.flush();
- }
- public void markAsReaded(Message message){
- message.setReaded(true);
- em.flush();
- }
}
Deleted:
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/MessageComparator.java
===================================================================
---
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/MessageComparator.java 2009-02-03
15:36:56 UTC (rev 12549)
+++
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/MessageComparator.java 2009-02-03
16:00:20 UTC (rev 12550)
@@ -1,32 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-package org.richfaces.realworld.service;
-
-import java.util.Comparator;
-
-import org.richfaces.realworld.domain.Message;
-
-public class MessageComparator implements Comparator<Message> {
-
- public int compare(Message mes1, Message mes2) {
- return mes1.getDate().after(mes2.getDate()) ? -1 : 1;
- }
-}
Modified:
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/SearchService.java
===================================================================
---
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/SearchService.java 2009-02-03
15:36:56 UTC (rev 12549)
+++
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/SearchService.java 2009-02-03
16:00:20 UTC (rev 12550)
@@ -150,7 +150,7 @@
private List<Image> filter(List<Image> tempResult, List<String>
additions,
List<String> removals) {
List<Image> result = new ArrayList<Image>();
- result.addAll(tempResult);
+ /*result.addAll(tempResult);
for(Image i : tempResult){
for(String a:additions){
if(!i.containTag(a)){
@@ -168,7 +168,7 @@
break;
}
}
- }
+ }*/
return tempResult;
}
Modified:
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/UserAction.java
===================================================================
---
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/UserAction.java 2009-02-03
15:36:56 UTC (rev 12549)
+++
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/UserAction.java 2009-02-03
16:00:20 UTC (rev 12550)
@@ -20,7 +20,6 @@
*/
package org.richfaces.realworld.service;
-import java.util.Collections;
import java.util.List;
import javax.ejb.Stateless;
@@ -31,9 +30,7 @@
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Out;
import org.richfaces.realworld.domain.Album;
-import org.richfaces.realworld.domain.FriendshipRequest;
import org.richfaces.realworld.domain.Image;
-import org.richfaces.realworld.domain.Message;
import org.richfaces.realworld.domain.User;
@Name("userAction")
@@ -77,14 +74,6 @@
em.flush();
this.user = user;
}
-
- @SuppressWarnings("unchecked")
- public List<Message> getOutgoingMessages(){
- List<Message> messages = em.createNamedQuery(Constants.USER_OUTCOMING_MESSAGES)
- .setParameter(Constants.LOGIN_PARAMETER, user.getLogin())
- .getResultList();
- return messages;
- }
public boolean isUserExist(String login) {
return em.createNamedQuery(Constants.USER_EXIST_QUERY)
@@ -115,13 +104,6 @@
return result > 0;
}
- public void addFriend(User user, User friend, FriendshipRequest request) {
- friend.removeFriendshipRequest(request);
- user.addFriend(friend);
- friend.addFriend(user);
- em.flush();
- }
-
public void removeFromFavoriteAlbums(User user, Album album) {
user.removeFromFavoriteAlbums(album);
em.flush();
@@ -137,25 +119,6 @@
user = new User();
}
- public List<Message> getHistory(User historyUser) {
- List<Message> userMessages = getUserMessages(historyUser);
- List<Message> userSecondMessages = getUserSecondMessages(historyUser);
- userMessages.addAll(userSecondMessages);
- MessageComparator c = new MessageComparator();
- Collections.sort(userMessages, c );
- return userMessages;
- }
-
- @SuppressWarnings("unchecked")
- private List<Message> getUserSecondMessages(User historyUser) {
- return
em.createNamedQuery(Constants.USER_HISTORY_MESSAGES_QUERY).setParameter(Constants.AUTHOR_PARAM,
historyUser).setParameter(Constants.OWNER_PARAM, user).getResultList();
- }
-
- @SuppressWarnings("unchecked")
- private List<Message> getUserMessages(User historyUser) {
- return
em.createNamedQuery(Constants.USER_HISTORY_MESSAGES_QUERY).setParameter(Constants.AUTHOR_PARAM,
user).setParameter(Constants.OWNER_PARAM, historyUser).getResultList();
- }
-
public void addFavoriteImage(Image image) {
user.addFavoriteImage(image);
image.getSharedOwners().add(user);
Modified: trunk/test-applications/realworld/ejb/src/main/resources/import.sql
===================================================================
--- trunk/test-applications/realworld/ejb/src/main/resources/import.sql 2009-02-03
15:36:56 UTC (rev 12549)
+++ trunk/test-applications/realworld/ejb/src/main/resources/import.sql 2009-02-03
16:00:20 UTC (rev 12550)
@@ -4,408 +4,115 @@
INSERT INTO Users(user_id, firstname, secondname, email, login, password, birthdate)
VALUES (4, 'Andrey', 'Markhel', 'amarkhel(a)exadel.com',
'sss', '12345', '1985-01-08');
INSERT INTO Users(user_id, firstname, secondname, email, login, password, birthdate)
VALUES (6, 'User', 'User', 'alevkovsky(a)exadel.com',
'user', '12345', '1985-01-01');
INSERT INTO Users(user_id, firstname, secondname, email, login, password, birthdate)
VALUES (5, 'Barak', 'Abama', 'amarkavtsov(a)exadel.com',
'admin', '12345', '1985-01-08');
-INSERT INTO albums(album_id, name, description, shared, album_user_id, parent_album_id)
VALUES (1, 'Cars', 'Photo of my dog', true, 1, null);
-INSERT INTO albums(album_id, name, description, shared, album_user_id, parent_album_id)
VALUES (2, 'Tetki', 'Simple Album 2', true, 1, null);
-INSERT INTO albums(album_id, name, description, shared, album_user_id, parent_album_id)
VALUES (3, 'Football', 'Simple Album 3', true, 2, null);
-INSERT INTO albums(album_id, name, description, shared, album_user_id, parent_album_id)
VALUES (4, 'Japan', 'Simple Album', true, 3, null);
-INSERT INTO albums(album_id, name, description, shared, album_user_id, parent_album_id)
VALUES (5, 'Music', 'Simple Album 2', false, 3, null);
-INSERT INTO albums(album_id, name, description, shared, album_user_id, parent_album_id)
VALUES (6, 'Child1', 'Simple Album 2', true, 1, 1);
-INSERT INTO albums(album_id, name, description, shared, album_user_id, parent_album_id)
VALUES (7, 'Child2', 'Simple Album 2', true, 1, 1);
-INSERT INTO albums(album_id, name, description, shared, album_user_id, parent_album_id)
VALUES (8, 'Sport', 'Sport', true, 5, null);
-INSERT INTO albums(album_id, name, description, shared, album_user_id, parent_album_id)
VALUES (9, 'Nature', 'Nature', true, 5, null);
-INSERT INTO albums(album_id, name, description, shared, album_user_id, parent_album_id)
VALUES (10, 'Military', 'Military', true, 5, null);
-INSERT INTO albums(album_id, name, description, shared, album_user_id, parent_album_id)
VALUES (11, 'F1', 'Formula 1', true, 5, 8);
-INSERT INTO albums(album_id, name, description, shared, album_user_id, parent_album_id)
VALUES (12, 'Football', 'FootBall', true, 5, 8);
-INSERT INTO albums(album_id, name, description, shared, album_user_id, parent_album_id)
VALUES (13, 'Flowers', 'Flowers pictures', true, 5, 9);
-INSERT INTO albums(album_id, name, description, shared, album_user_id, parent_album_id)
VALUES (14, 'Space', 'Space pictures', true, 5, 9);
-INSERT INTO albums(album_id, name, description, shared, album_user_id, parent_album_id)
VALUES (15, 'Rivers', 'Rivers pictures', true, 5, 9);
+INSERT INTO albums(album_id, name, description, shared, album_user_id, parent_album_id)
VALUES (15, 'Water', 'Rivers pictures', true, 5, null);
-INSERT INTO albums(album_id, name, description, shared, album_user_id, parent_album_id)
VALUES (16, 'Water', 'Water Photos', true, 6, null);
-INSERT INTO albums(album_id, name, description, shared, album_user_id, parent_album_id)
VALUES (17, 'Bmw', 'BMW Cars Photos', true, 6, null);
+INSERT INTO albums(album_id, name, description, shared, album_user_id, parent_album_id)
VALUES (20, 'Sport', 'Nature pictures', true, 1, null);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (1, 100, 21);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (2, 200, 21);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (3, 100, 31);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (4, 100, 21);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (5, 100, 21);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (6, 100, 41);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (7, 100, 20);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (8, 55, 11);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (9, 100, 21);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (10, 100, 21);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (11, 100, 25);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (12, 110, 21);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (13, 100, 19);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (14, 101, 21);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (15, 102, 17);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (16, 103, 21);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (17, 104, 15);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (18, 100, 21);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (19, 110, 22);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (20, 160, 23);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (21, 100, 24);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (22, 100, 25);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (23, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (24, 102, 27);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (25, 103, 28);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (26, 104, 29);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (27, 100, 30);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (28, 110, 31);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (29, 104, 29);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (30, 100, 30);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (31, 110, 31);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (32, 110, 10);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (33, 100, 15);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (34, 200, 48);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (35, 350, 20);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (36, 450, 46);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (37, 120, 33);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (38, 130, 37);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (39, 180, 31);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (40, 95, 11);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (41, 80, 10);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (42, 98, 13);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (43, 110, 21);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (44, 100, 12);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (45, 102, 18);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (46, 98, 19);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (47, 2, 40);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (48, 200, 36);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (49, 180, 31);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (50, 95, 11);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (51, 80, 10);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (52, 98, 13);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (53, 110, 21);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (54, 100, 12);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (55, 102, 18);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (56, 98, 19);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (57, 2, 40);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (58, 200, 36);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (59, 180, 31);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (60, 95, 11);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (61, 80, 10);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (62, 98, 13);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (63, 110, 21);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (64, 100, 12);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (65, 102, 18);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (66, 98, 19);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (67, 2, 40);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (68, 200, 36);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (69, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (70, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (71, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (72, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (73, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (74, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (75, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (76, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (77, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (78, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (79, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (80, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (81, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (82, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (83, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (84, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (85, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (86, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (87, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (88, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (89, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (90, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (91, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (92, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (93, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (94, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (95, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (96, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (97, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (98, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (99, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (100, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (101, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (102, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (103, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (104, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (105, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (106, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (107, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (108, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (109, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (110, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (111, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (112, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (113, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (114, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (115, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (116, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (117, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (118, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (119, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (120, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (121, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (122, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (123, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (124, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (125, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (126, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (127, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (128, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (129, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (130, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (131, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (132, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (133, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (134, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (135, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (136, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (137, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (138, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (139, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (140, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (141, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (142, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (143, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (144, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (145, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (146, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (147, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (148, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (149, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (150, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (151, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (152, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (153, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (154, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (155, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (156, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (157, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (158, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (159, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (160, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (161, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (162, 101, 26);
-INSERT INTO Ranks(rank_id, total, hits) VALUES (163, 101, 26);
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (1, 'Aston Martin',
'amarkhel/Cars/aston_martin.jpg', 'Where is the Batman?',
'2008-12-18', 1, 1,'Canon S3', 500, 20, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (2, 'Ferrari',
'amarkhel/Cars/ferrari_profile.jpg', 'Beauty!', '2008-12-18', 1,
2,'Canon S3', 500, 37.5, 314, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (3, 'Australian supercar',
'amarkhel/Cars/holden-efijy-1809.jpg', 'This one glitters in my garage
;)', '2008-12-18', 1, 3,'Canon S3', 450, 28.1, 221,
'2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (4, 'Hulme Supercar',
'amarkhel/Cars/hulme_supercar_side_parked.jpg', 'Saw it in Germany in summer
2007', '2008-12-18', 1, 4,'Canon S3', 500, 39.8, 239,
'2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (5, 'Pagani Zonda',
'amarkhel/Cars/Pagani_Zonda.jpg', 'The picture is provided by my friend
photographer', '2008-12-18', 1, 5,'Canon S3', 500, 49.6, 338,
'2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (6, 'Codatronca (concept)',
'amarkhel/Cars/spadaconcept codatronca.jpg', 'Just concept',
'2008-12-18', 1, 6,'Canon S3', 560, 21.7, 360, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (7, 'Unknown supercar',
'amarkhel/Cars/supercar.jpg', 'Tell me it name if you know',
'2008-12-18', 1, 7,'Canon S3', 480, 29.7, 360, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (8, 'Audrey Tautou',
'amarkhel/Tetki/Audrey_Tautou.jpg', 'Pretty girl!', '2008-12-18',
2, 8,'Canon S3', 396, 34.7, 500, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (9, 'Juliette Binoche',
'amarkhel/Tetki/Juliette_Binoche.jpg', 'Saw her in "Chocolate" at
first', '2008-12-18', 2, 9,'Canon S3', 400, 44.9, 500,
'2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (10, 'Penelope Cruz',
'amarkhel/Tetki/Penelope_Cruz.jpg', 'Without comments',
'2008-12-18', 2, 10,'Canon S3', 500, 41.7, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (11, 'Rihanna',
'amarkhel/Tetki/Rihanna.jpg', 'Was born in Barbados. True or false?',
'2008-12-18', 2, 11,'Canon S3', 375, 52.5, 500, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (12, 'Uma Turman',
'amarkhel/Tetki/Uma_Turman.jpg', 'Share the delight with Tarantino )',
'2008-12-18', 2, 12,'Canon S3', 368, 40.2, 500, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (13, 'Basketball soccer',
'root/Football/Basketball_soccer.jpg', 'They never saw camera',
'2008-12-18', 3, 13,'Canon S3', 500, 33.1, 374, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (14, 'bdysch!!!',
'root/Football/bdysch!!!.jpg', 'Dermo sluchaetsia', '2008-12-18',
3, 14,'Canon S3', 500, 50.4, 333, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (15, 'Training',
'root/Football/euro2008_holland_wideweb__470x321,0.jpg', ' ) ',
'2008-12-18', 3, 15,'Canon S3', 470, 37.3, 331, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (16, 'Also football',
'root/Football/flag_football.jpg', 'This is also football, but I do not
understand it at all', '2008-12-18', 3, 16,'Canon S3', 500, 24.4,
333, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (17, 'Soccer',
'root/Football/soccer.jpg', 'Soccer differs from football',
'2008-12-18', 3, 17,'Canon S3', 350, 45.3, 500, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (18, 'from birds fly',
'qqqq/Japan/birds_fly.jpg', 'One of the megalopolices',
'2008-12-18', 4, 18,'Canon S3', 500, 53.4, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (19, 'Haruki Murakami',
'qqqq/Japan/Haruki_Murakami.jpg', 'World famous aouthor',
'2008-12-18', 4, 19,'Canon S3', 500, 36, 376, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (20, 'Street fashion',
'qqqq/Japan/Japanese_Street_Fashion.jpg', 'Venture to walk in such in our
streets?', '2008-12-18', 4, 20,'Canon S3', 367, 59.2, 500,
'2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (21, 'Kendo Championship',
'qqqq/Japan/Kendo_Championship_2006.jpg', 'Samurais steel alive!',
'2008-12-18', 4, 21,'Canon S3', 500, 48.7, 332, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (22, 'Live in peace',
'qqqq/Japan/live_in_piece.jpg', 'The best place for meditation',
'2008-12-18', 4, 22,'Canon S3', 500, 42.7, 398, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (23, 'Modern family',
'qqqq/Japan/modern_japanesse_family.jpg', 'Where is his mother?!',
'2008-12-18', 4, 23,'Canon S3', 500, 43.1, 500, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (24, 'Zen garden',
'qqqq/Japan/zen-garden_landscape_design.jpg', 'Fen Shui i vsia fignia',
'2008-12-18', 4, 24,'Canon S3', 500, 46.1, 375, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (25, 'Sergei Babkin',
'qqqq/Music/Babkin.jpg', 'Also plays in theatre', '2008-12-18',
5, 25,'Canon S3', 525, 59.5, 350, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (26, 'Bob Marley',
'qqqq/Music/Bob_Marley.jpg', 'Everyone should know him',
'2008-12-18', 5, 26,'Canon S3', 496, 41.7, 384, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (27, 'Infected Mushroom',
'qqqq/Music/Infected_Mushroom.jpg', 'Famous psyhedelic trance group from
Israel', '2008-12-18', 5, 27,'Canon S3', 500, 35.4, 334,
'2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (28, 'Massive Attack',
'qqqq/Music/massiveAttack.jpg', 'They play theme to "House"',
'2008-12-18', 5, 28,'Canon S3', 500, 47.4, 377, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (29, 'Street musician',
'qqqq/Music/StreetMusician.jpg', 'unknown musician',
'2008-12-18', 5, 29,'Canon S3', 336, 60.5, 500, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (30, 'SOAD',
'qqqq/Music/system-of-a-down.jpg', 'Try not to loose your innervision!',
'2008-12-18', 5, 30,'Canon S3', 500, 39.5, 323, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (31, 'Amon Tobin',
'qqqq/Music/tobin.jpg', 'Brasilian, works in London. Try his
"Supermodified2000" album', '2008-12-18', 5, 31,'Canon S3',
450, 37, 302, '2008-12-01');
+INSERT INTO albums(album_id, name, description, shared, album_user_id, parent_album_id)
VALUES (23, 'Travel', 'Fun pictures', true, 1, null);
+INSERT INTO albums(album_id, name, description, shared, album_user_id, parent_album_id)
VALUES (25, 'Beach', 'Fun pictures', true, 1, null);
+INSERT INTO albums(album_id, name, description, shared, album_user_id, parent_album_id)
VALUES (26, 'Flowers', 'Fun pictures', true, 1, null);
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (32, 'Water1',
'user/Water/P4020733.jpg', 'Belorussian lakes and rivers',
'2008-12-18', 16, 49,'Canon S3', 768, 100.0, 1024, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (33, 'Water2',
'user/Water/P4300975.jpg', 'Belorussian lakes and rivers',
'2008-12-18', 16, 50,'Canon S3', 768, 100.0, 1024, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (34, 'Water3',
'user/Water/P5081081.jpg', 'Belorussian lakes and rivers',
'2008-12-18', 16, 51,'Canon S3', 768, 100.0, 1024, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (35, 'Water4',
'user/Water/P6191535.jpg', 'Belorussian lakes and rivers',
'2008-12-18', 16, 52,'Canon S3', 768, 100.0, 1024, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (36, 'Water5',
'user/Water/P6191547.jpg', 'Belorussian lakes and rivers',
'2008-12-18', 16, 53,'Canon S3', 768, 100.0, 1024, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (37, 'Water6',
'user/Water/P7121703.jpg', 'Belorussian lakes and rivers',
'2008-12-18', 16, 54,'Canon S3', 768, 100.0, 1024, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (38, 'Water7',
'user/Water/P7231757.jpg', 'Belorussian lakes and rivers',
'2008-12-18', 16, 55,'Canon S3', 768, 100.0, 1024, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (39, 'Water8',
'user/Water/Spa53749.jpg', 'Belorussian lakes and rivers',
'2008-12-18', 16, 56,'Canon S3', 768, 100.0, 1024, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (40, 'Water9',
'user/Water/SPA537441.jpg', 'Belorussian lakes and rivers',
'2008-12-18', 16, 57,'Canon S3', 768, 100.0, 1024, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (41, 'Water10',
'user/Water/Spa53740.jpg', 'Belorussian lakes and rivers',
'2008-12-18', 16, 58,'Canon S3', 768, 100.0, 1024, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (42, 'Bmw1',
'user/Bmw/bmw-5-e39-535i-1.jpg', 'BMW 5-series sedan',
'2008-12-18', 17, 59,'Canon S3', 600, 89.0, 800, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (43, 'Bmw2',
'user/Bmw/bmw-5-e39-535i-2.jpg', 'BMW 5-series sedan',
'2008-12-18', 17, 60,'Canon S3', 600, 137.0, 800, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (44, 'Bmw3',
'user/Bmw/bmw-5-e39-535i-3.jpg', 'BMW 5-series sedan',
'2008-12-18', 17, 61,'Canon S3', 600, 116.0, 800, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (45, 'Bmw4',
'user/Bmw/bmw-5-e39-535i-4.jpg', 'BMW 5-series sedan',
'2008-12-18', 17, 62,'Canon S3', 624, 133.0, 832, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (46, 'Bmw5',
'user/Bmw/bmw-5-e39-535i-6.jpg', 'BMW 5-series sedan',
'2008-12-18', 17, 63,'Canon S3', 624, 97.0, 832, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (47, 'Bmw6',
'user/Bmw/bmw-5-e39-535i-7.jpg', 'BMW 5-series sedan',
'2008-12-18', 17, 64,'Canon S3', 624, 100.0, 832, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (48, 'Bmw7',
'user/Bmw/bmw-5-e39-535i-8.jpg', 'BMW 5-series sedan',
'2008-12-18', 17, 65,'Canon S3', 546, 96.0, 728, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (49, 'Bmw8',
'user/Bmw/bmw_525i_sedan_1.jpg', 'BMW 5-series sedan',
'2008-12-18', 17, 66,'Canon S3', 768, 284.0, 1024, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (50, 'Bmw9',
'user/Bmw/bmw_530i_3.jpg', 'BMW 5-series sedan', '2008-12-18', 17,
67,'Canon S3', 1200, 157.0, 1600, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (51, 'Bmw10',
'user/Bmw/bmw_m5_sedan_2.jpg', 'BMW 5-series sedan', '2008-12-18',
17, 68,'Canon S3', 768, 152.0, 1024, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (52, 'alonso',
'admin/sport/f1/alonso.jpg', 'alonso', '2008-12-18', 11,
69,'Canon S3', 1024, 410.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (53, 'alonso2',
'admin/sport/f1/alonso2.jpg', 'alonso2', '2008-12-18', 11,
70,'Canon S3', 1024, 546.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (54, 'bmw',
'admin/sport/f1/bmw.jpg', 'bmw', '2008-12-18', 11, 71,'Canon
S3', 1024, 232.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (55, 'f1_2',
'admin/sport/f1/f1_2.jpg', 'f1_2', '2008-12-18', 11,
72,'Canon S3', 1024, 239.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (56, 'f1_7',
'admin/sport/f1/f1_7.jpg', 'f1_7', '2008-12-18', 11,
73,'Canon S3', 1024, 184.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (57, 'ferrary_pit_stop',
'admin/sport/f1/ferrary_pit_stop.jpg', 'ferrary_pit_stop',
'2008-12-18', 11, 74,'Canon S3', 1024, 158.000000, 768,
'2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (58, 'formula-1-cars',
'admin/sport/f1/formula-1-cars.jpg', 'formula-1-cars',
'2008-12-18', 11, 75,'Canon S3', 1024, 102.000000, 768,
'2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (59, 'formula1_1',
'admin/sport/f1/formula1_1.jpg', 'formula1_1', '2008-12-18', 11,
76,'Canon S3', 1024, 288.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (60, 'formula1_team',
'admin/sport/f1/formula1_team.jpg', 'formula1_team',
'2008-12-18', 11, 77,'Canon S3', 1024, 175.000000, 768,
'2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (61, 'formula_1',
'admin/sport/f1/formula_1.jpg', 'formula_1', '2008-12-18', 11,
78,'Canon S3', 1024, 198.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (62, 'kimi',
'admin/sport/f1/kimi.jpg', 'kimi', '2008-12-18', 11,
79,'Canon S3', 1024, 450.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (63, 'kimi_raikkonen',
'admin/sport/f1/kimi_raikkonen.jpg', 'kimi_raikkonen',
'2008-12-18', 11, 80,'Canon S3', 1024, 149.000000, 768,
'2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (64, 'lewis_hamilton',
'admin/sport/f1/lewis_hamilton.jpg', 'lewis_hamilton',
'2008-12-18', 11, 81,'Canon S3', 1024, 354.000000, 768,
'2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (65, 'renault_pit_stop',
'admin/sport/f1/renault_pit_stop.jpg', 'renault_pit_stop',
'2008-12-18', 11, 82,'Canon S3', 1024, 192.000000, 768,
'2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (66, 'reno2',
'admin/sport/f1/reno2.jpg', 'reno2', '2008-12-18', 11,
83,'Canon S3', 1024, 405.000000, 768, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (98, 'korana',
'admin/Nature/Rivers/korana.jpg', 'korana', '2008-12-18', 15,
'Canon S3', 1024, 1917.000000, 768, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (99, 'korana2',
'admin/Nature/Rivers/korana2.jpg', 'korana2', '2008-12-18', 15,
'Canon S3', 1024, 949.000000, 768, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (100, 'Re4ka',
'admin/Nature/Rivers/Re4ka.jpg', 'Re4ka', '2008-12-18', 15,
'Canon S3', 1024, 412.000000, 768, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (101, 'river10',
'admin/Nature/Rivers/river10.jpg', 'river10', '2008-12-18', 15,
'Canon S3', 1024, 276.000000, 768, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (102, 'river11',
'admin/Nature/Rivers/river11.jpg', 'river11', '2008-12-18', 15,
'Canon S3', 1024, 187.000000, 768, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (103, 'river12',
'admin/Nature/Rivers/river12.jpg', 'river12', '2008-12-18', 15,
'Canon S3', 1024, 265.000000, 768, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (104, 'river13',
'admin/Nature/Rivers/river13.jpg', 'river13', '2008-12-18', 15,
'Canon S3', 1024, 106.000000, 768, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (105, 'river2',
'admin/Nature/Rivers/river2.jpg', 'river2', '2008-12-18', 15,
'Canon S3', 1024, 130.000000, 768, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (106, 'river3',
'admin/Nature/Rivers/river3.jpg', 'river3', '2008-12-18', 15,
'Canon S3', 1024, 126.000000, 768, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (107, 'river4',
'admin/Nature/Rivers/river4.jpg', 'river4', '2008-12-18', 15,
'Canon S3', 1024, 267.000000, 768, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (108, 'river5',
'admin/Nature/Rivers/river5.jpg', 'river5', '2008-12-18', 15,
'Canon S3', 1024, 176.000000, 768, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (109, 'river6',
'admin/Nature/Rivers/river6.jpg', 'river6', '2008-12-18', 15,
'Canon S3', 1024, 126.000000, 768, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (110, 'river7',
'admin/Nature/Rivers/river7.jpg', 'river7', '2008-12-18', 15,
'Canon S3', 1024, 201.000000, 768, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (111, 'river8',
'admin/Nature/Rivers/river8.jpg', 'river8', '2008-12-18', 15,
'Canon S3', 1024, 278.000000, 768, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (112, 'river9',
'admin/Nature/Rivers/river9.jpg', 'river9', '2008-12-18', 15,
'Canon S3', 1024, 210.000000, 768, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (113, 'river_and_torrents',
'admin/Nature/Rivers/river_and_torrents.jpg', 'river_and_torrents',
'2008-12-18', 15, 'Canon S3', 1024, 161.000000, 768,
'2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (67, 'Basketball_soccer',
'admin/sport/Football/Basketball_soccer.jpg', 'Basketball_soccer',
'2008-12-18', 12, 84,'Canon S3', 1024, 33.000000, 768,
'2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (68,
'Basketball_soccer_medium',
'admin/sport/Football/Basketball_soccer_medium.jpg',
'Basketball_soccer_medium', '2008-12-18', 12, 85,'Canon S3',
1024, 49.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (69, 'Basketball_soccer_mini',
'admin/sport/Football/Basketball_soccer_mini.jpg',
'Basketball_soccer_mini', '2008-12-18', 12, 86,'Canon S3', 1024,
4.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (70, 'bdysch!!!',
'admin/sport/Football/bdysch!!!.jpg', 'bdysch!!!', '2008-12-18',
12, 87,'Canon S3', 1024, 51.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (71, 'bdysch!!!_medium',
'admin/sport/Football/bdysch!!!_medium.jpg', 'bdysch!!!_medium',
'2008-12-18', 12, 88,'Canon S3', 1024, 35.000000, 768,
'2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (72, 'bdysch!!!_mini',
'admin/sport/Football/bdysch!!!_mini.jpg', 'bdysch!!!_mini',
'2008-12-18', 12, 89,'Canon S3', 1024, 3.000000, 768,
'2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (73,
'euro2008_holland_wideweb__470x321,0',
'admin/sport/Football/euro2008_holland_wideweb__470x321,0.jpg',
'euro2008_holland_wideweb__470x321,0', '2008-12-18', 12, 90,'Canon
S3', 1024, 38.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (74,
'euro2008_holland_wideweb__470x321,0_medium',
'admin/sport/Football/euro2008_holland_wideweb__470x321,0_medium.jpg',
'euro2008_holland_wideweb__470x321,0_medium', '2008-12-18', 12,
91,'Canon S3', 1024, 35.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (75,
'euro2008_holland_wideweb__470x321,0_mini',
'admin/sport/Football/euro2008_holland_wideweb__470x321,0_mini.jpg',
'euro2008_holland_wideweb__470x321,0_mini', '2008-12-18', 12,
92,'Canon S3', 1024, 3.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (76, 'flag_football',
'admin/sport/Football/flag_football.jpg', 'flag_football',
'2008-12-18', 12, 93,'Canon S3', 1024, 25.000000, 768,
'2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (77, 'flag_football_medium',
'admin/sport/Football/flag_football_medium.jpg', 'flag_football_medium',
'2008-12-18', 12, 94,'Canon S3', 1024, 40.000000, 768,
'2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (78, 'flag_football_mini',
'admin/sport/Football/flag_football_mini.jpg', 'flag_football_mini',
'2008-12-18', 12, 95,'Canon S3', 1024, 4.000000, 768,
'2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (79, 'Soccer',
'admin/sport/Football/Soccer.jpg', 'Soccer', '2008-12-18', 12,
96,'Canon S3', 1024, 46.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (80, 'Soccer_medium',
'admin/sport/Football/Soccer_medium.jpg', 'Soccer_medium',
'2008-12-18', 12, 97,'Canon S3', 1024, 37.000000, 768,
'2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (81, 'Soccer_mini',
'admin/sport/Football/Soccer_mini.jpg', 'Soccer_mini',
'2008-12-18', 12, 98,'Canon S3', 1024, 3.000000, 768,
'2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (82, 'blackeyed_susan',
'admin/Nature/Flowers/blackeyed_susan.jpg', 'blackeyed_susan',
'2008-12-18', 13, 100,'Canon S3', 1024, 141.000000, 768,
'2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (83, 'daisies',
'admin/Nature/Flowers/daisies.jpg', 'daisies', '2008-12-18', 13,
101,'Canon S3', 1024, 125.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (84, 'daisies_2',
'admin/Nature/Flowers/daisies_2.jpg', 'daisies_2', '2008-12-18',
13, 102,'Canon S3', 1024, 150.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (85, 'flower1',
'admin/Nature/Flowers/flower1.jpg', 'flower1', '2008-12-18', 13,
103,'Canon S3', 1024, 68.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (86, 'flower2',
'admin/Nature/Flowers/flower2.jpg', 'flower2', '2008-12-18', 13,
104,'Canon S3', 1024, 86.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (87, 'flower3',
'admin/Nature/Flowers/flower3.jpg', 'flower3', '2008-12-18', 13,
105,'Canon S3', 1024, 259.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (88, 'flower4',
'admin/Nature/Flowers/flower4.jpg', 'flower4', '2008-12-18', 13,
106,'Canon S3', 1024, 266.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (89, 'flower5',
'admin/Nature/Flowers/flower5.jpg', 'flower5', '2008-12-18', 13,
107,'Canon S3', 1024, 137.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (90, 'flower6',
'admin/Nature/Flowers/flower6.jpg', 'flower6', '2008-12-18', 13,
108,'Canon S3', 1024, 437.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (91, 'goldenrod',
'admin/Nature/Flowers/goldenrod.jpg', 'goldenrod', '2008-12-18',
13, 109,'Canon S3', 1024, 266.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (92, 'many_yellow_flowers',
'admin/Nature/Flowers/many_yellow_flowers.jpg', 'many_yellow_flowers',
'2008-12-18', 13, 110,'Canon S3', 1024, 157.000000, 768,
'2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (93, 'miniature_rose',
'admin/Nature/Flowers/miniature_rose.jpg', 'miniature_rose',
'2008-12-18', 13, 111,'Canon S3', 1024, 147.000000, 768,
'2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (94, 'purple_flowers',
'admin/Nature/Flowers/purple_flowers.jpg', 'purple_flowers',
'2008-12-18', 13, 112,'Canon S3', 1024, 185.000000, 768,
'2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (95, 'red_rose',
'admin/Nature/Flowers/red_rose.jpg', 'red_rose', '2008-12-18',
13, 113,'Canon S3', 1024, 132.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (96, 'red_roses',
'admin/Nature/Flowers/red_roses.jpg', 'red_roses', '2008-12-18',
13, 114,'Canon S3', 1024, 157.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (97, 'yellow_flower',
'admin/Nature/Flowers/yellow_flower.jpg', 'yellow_flower',
'2008-12-18', 13, 115,'Canon S3', 1024, 107.000000, 768,
'2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (98, 'korana',
'admin/Nature/Rivers/korana.jpg', 'korana', '2008-12-18', 15,
116,'Canon S3', 1024, 1917.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (99, 'korana2',
'admin/Nature/Rivers/korana2.jpg', 'korana2', '2008-12-18', 15,
117,'Canon S3', 1024, 949.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (100, 'Re4ka',
'admin/Nature/Rivers/Re4ka.jpg', 'Re4ka', '2008-12-18', 15,
118,'Canon S3', 1024, 412.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (101, 'river10',
'admin/Nature/Rivers/river10.jpg', 'river10', '2008-12-18', 15,
119,'Canon S3', 1024, 276.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (102, 'river11',
'admin/Nature/Rivers/river11.jpg', 'river11', '2008-12-18', 15,
120,'Canon S3', 1024, 187.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (103, 'river12',
'admin/Nature/Rivers/river12.jpg', 'river12', '2008-12-18', 15,
121,'Canon S3', 1024, 265.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (104, 'river13',
'admin/Nature/Rivers/river13.jpg', 'river13', '2008-12-18', 15,
122,'Canon S3', 1024, 106.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (105, 'river2',
'admin/Nature/Rivers/river2.jpg', 'river2', '2008-12-18', 15,
123,'Canon S3', 1024, 130.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (106, 'river3',
'admin/Nature/Rivers/river3.jpg', 'river3', '2008-12-18', 15,
124,'Canon S3', 1024, 126.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (107, 'river4',
'admin/Nature/Rivers/river4.jpg', 'river4', '2008-12-18', 15,
125,'Canon S3', 1024, 267.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (108, 'river5',
'admin/Nature/Rivers/river5.jpg', 'river5', '2008-12-18', 15,
126,'Canon S3', 1024, 176.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (109, 'river6',
'admin/Nature/Rivers/river6.jpg', 'river6', '2008-12-18', 15,
127,'Canon S3', 1024, 126.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (110, 'river7',
'admin/Nature/Rivers/river7.jpg', 'river7', '2008-12-18', 15,
128,'Canon S3', 1024, 201.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (111, 'river8',
'admin/Nature/Rivers/river8.jpg', 'river8', '2008-12-18', 15,
129,'Canon S3', 1024, 278.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (112, 'river9',
'admin/Nature/Rivers/river9.jpg', 'river9', '2008-12-18', 15,
130,'Canon S3', 1024, 210.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (113, 'river_and_torrents',
'admin/Nature/Rivers/river_and_torrents.jpg', 'river_and_torrents',
'2008-12-18', 15, 131,'Canon S3', 1024, 161.000000, 768,
'2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (114, 'asteroid',
'admin/Nature/Space/asteroid.jpg', 'asteroid', '2008-12-18', 14,
132,'Canon S3', 1024, 71.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (115, 'astronaut',
'admin/Nature/Space/astronaut.jpg', 'astronaut', '2008-12-18',
14, 133,'Canon S3', 1024, 202.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (116, 'earth',
'admin/Nature/Space/earth.jpg', 'earth', '2008-12-18', 14,
134,'Canon S3', 1024, 232.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (117, 'galaxy',
'admin/Nature/Space/galaxy.jpg', 'galaxy', '2008-12-18', 14,
135,'Canon S3', 1024, 137.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (118, 'galaxy2',
'admin/Nature/Space/galaxy2.jpg', 'galaxy2', '2008-12-18', 14,
136,'Canon S3', 1024, 328.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (119, 'galaxy3',
'admin/Nature/Space/galaxy3.jpg', 'galaxy3', '2008-12-18', 14,
137,'Canon S3', 1024, 59.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (120, 'galaxy4',
'admin/Nature/Space/galaxy4.jpg', 'galaxy4', '2008-12-18', 14,
138,'Canon S3', 1024, 218.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (121, 'galaxy5',
'admin/Nature/Space/galaxy5.jpg', 'galaxy5', '2008-12-18', 14,
139,'Canon S3', 1024, 134.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (122, 'iss',
'admin/Nature/Space/iss.jpg', 'iss', '2008-12-18', 14,
140,'Canon S3', 1024, 154.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (123, 'isss',
'admin/Nature/Space/isss.jpg', 'isss', '2008-12-18', 14,
141,'Canon S3', 1024, 65.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (124, 'moon',
'admin/Nature/Space/moon.jpg', 'moon', '2008-12-18', 14,
142,'Canon S3', 1024, 174.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (125, 'nebula',
'admin/Nature/Space/nebula.jpg', 'nebula', '2008-12-18', 14,
143,'Canon S3', 1024, 99.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (126, 'nebula2',
'admin/Nature/Space/nebula2.jpg', 'nebula2', '2008-12-18', 14,
144,'Canon S3', 1024, 124.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (127, 'nebula3',
'admin/Nature/Space/nebula3.jpg', 'nebula3', '2008-12-18', 14,
145,'Canon S3', 1024, 86.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (128, 'satellite',
'admin/Nature/Space/satellite.jpg', 'satellite', '2008-12-18',
14, 146,'Canon S3', 1024, 231.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (129, 'space_station',
'admin/Nature/Space/space_station.jpg', 'space_station',
'2008-12-18', 14, 147,'Canon S3', 1024, 32.000000, 768,
'2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (130, 'sun',
'admin/Nature/Space/sun.jpg', 'sun', '2008-12-18', 14,
148,'Canon S3', 1024, 67.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (131, 'abrams',
'admin/Military/abrams.jpg', 'abrams', '2008-12-18', 10,
149,'Canon S3', 1024, 228.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (132, 'aircrafts',
'admin/Military/aircrafts.jpg', 'aircrafts', '2008-12-18', 10,
150,'Canon S3', 1024, 209.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (133, 'atomic_bomb_test',
'admin/Military/atomic_bomb_test.jpg', 'atomic_bomb_test',
'2008-12-18', 10, 151,'Canon S3', 1024, 123.000000, 768,
'2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (134, 'a_10',
'admin/Military/a_10.jpg', 'a_10', '2008-12-18', 10,
152,'Canon S3', 1024, 145.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (135, 'F_22_Raptor',
'admin/Military/F_22_Raptor.jpg', 'F_22_Raptor', '2008-12-18',
10, 153,'Canon S3', 1024, 44.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (136, 'F_22_Raptor_2',
'admin/Military/F_22_Raptor_2.jpg', 'F_22_Raptor_2',
'2008-12-18', 10, 154,'Canon S3', 1024, 119.000000, 768,
'2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (137, 'F_22_Raptor_3',
'admin/Military/F_22_Raptor_3.jpg', 'F_22_Raptor_3',
'2008-12-18', 10, 155,'Canon S3', 1024, 99.000000, 768,
'2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (138, 'KA-226',
'admin/Military/KA-226.jpg', 'KA-226', '2008-12-18', 10,
156,'Canon S3', 1024, 54.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (139, 'Leopard_2',
'admin/Military/Leopard_2.jpg', 'Leopard_2', '2008-12-18', 10,
157,'Canon S3', 1024, 454.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (140, 'Leopard_3',
'admin/Military/Leopard_3.jpg', 'Leopard_3', '2008-12-18', 10,
158,'Canon S3', 1024, 507.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (141, 'MH_53',
'admin/Military/MH_53.jpg', 'MH_53', '2008-12-18', 10,
159,'Canon S3', 1024, 168.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (142, 'mig_21',
'admin/Military/mig_21.jpg', 'mig_21', '2008-12-18', 10,
160,'Canon S3', 1024, 98.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (143, 'soldier_sniper',
'admin/Military/soldier_sniper.jpg', 'soldier_sniper',
'2008-12-18', 10, 161,'Canon S3', 1024, 102.000000, 768,
'2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (144, 'soldier_USMC',
'admin/Military/soldier_USMC.jpg', 'soldier_USMC', '2008-12-18',
10, 162,'Canon S3', 1024, 149.000000, 768, '2008-12-01');
-INSERT INTO images(image_id, name, path, description, created, img_album_id, rank_id,
cameraModel, height, size, width, uploaded) VALUES (145, 'tank 1',
'admin/Military/tank 1.jpg', 'tank 1', '2008-12-18', 10,
163,'Canon S3', 1024, 293.000000, 768, '2008-12-01');
-INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (1, 'Beach', 1);
-INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (22, 'Sun', 1);
-INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (23, 'Summer',
1);
-INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (2, 'Cool', 1);
-INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (3, 'richfaces',
2);
-INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (24, 'Beach', 2);
-INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (25, 'Sun', 2);
-INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (26, 'amarkhel',
2);
-INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (4, 'Cool', 3);
-INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (5, 'theCool',
4);
-INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (6, 'Cool', 5);
-INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (7, 'rich', 6);
-INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (8, 'Cool', 7);
-INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (9, 'New year',
8);
-INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (10, 'Cool', 9);
-INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (11, 'Cool', 10);
-INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (12, 'Minsk',
11);
-INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (13, 'Cool', 12);
-INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (14, 'Minsk',
13);
-INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (15, 'Cool', 14);
-INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (16, 'Cool', 15);
-INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (17, 'Minsk',
16);
-INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (18, 'Cool', 17);
-INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (19, 'friend',
18);
-INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (20, 'Cool', 19);
-INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (21, 'Cool2',
20);
-INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (27, 'Cool', 54);
-INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (28, 'Cool', 55);
-INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (29, 'Cool', 56);
-INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (30, 'Cool', 57);
-INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (31, 'Cool', 58);
-INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (32, 'Car', 59);
-INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (33, 'Car', 60);
-INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (34, 'Car', 61);
-INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (35, 'Car', 62);
-INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (36, 'Car', 63);
-INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (37, 'Car', 64);
-INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (38, 'Car', 65);
-INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (39, 'Car', 66);
-INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (40, 'Car', 67);
-INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (41, 'Car', 68);
-INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (42, 'Cool', 49);
-INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (43, 'Cool', 50);
-INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (44, 'Cool', 51);
-INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (45, 'Cool', 52);
-INSERT INTO metatags(metatag_id, tag, image_metatag_id) VALUES (46, 'Cool', 53);
-INSERT INTO comments(comment_id, date, message, image_comment_id, from_user_id) VALUES
(1, '1985-01-08', 'Hello I am user', 1, 2);
-INSERT INTO comments(comment_id, date, message, image_comment_id, from_user_id) VALUES
(2, '1985-01-08', 'Hello I am user2', 1, 3);
-INSERT INTO messages(message_id, date, message, author_id, owner_id, readed, theme,
friendshipRequest) VALUES (1, '1985-01-08', 'Hello I am user', 2, 1,
false, 'Hello, amarkhel', false);
-INSERT INTO messages(message_id, date, message, author_id, owner_id, readed, theme,
friendshipRequest) VALUES (2, '1985-01-08', 'Please, add meto your
friends', 3, 1, false, 'Request for friendship', true);
-INSERT INTO messages(message_id, date, message, author_id, owner_id, readed, theme,
friendshipRequest) VALUES (3, '1985-01-09', 'Hello ', 1, 2, false,
'Hello, amarkhel', false);
-INSERT INTO shared_albums(album_id, user_id) VALUES(4, 1);
-INSERT INTO shared_albums(album_id, user_id) VALUES(5, 1);
-INSERT INTO shared_albums(album_id, user_id) VALUES(8, 5);
-INSERT INTO shared_albums(album_id, user_id) VALUES(9, 5);
-INSERT INTO shared_images(image_id, user_id) VALUES(30, 1);
-INSERT INTO shared_images(image_id, user_id) VALUES(31, 1);
-INSERT INTO user_friends(user1_id, user2_id) VALUES(1, 2);
-INSERT INTO user_friends(user1_id, user2_id) VALUES(1, 5);
-INSERT INTO friendship_requests(REQUEST_ID, USER_ID, FRIEND_ID) VALUES(1, 3, 1);
\ No newline at end of file
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (500, 'Sport1',
'amarkhel/Sport/sport.jpg', 'Where is the Batman?', '2008-12-18',
20, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (501, 'Sport1',
'amarkhel/Sport/sport (1).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (502, 'Sport1',
'amarkhel/Sport/sport (2).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (503, 'Sport1',
'amarkhel/Sport/sport (3).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (504, 'Sport1',
'amarkhel/Sport/sport (4).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (505, 'Sport1',
'amarkhel/Sport/sport (5).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (506, 'Sport1',
'amarkhel/Sport/sport (6).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (507, 'Sport1',
'amarkhel/Sport/sport (7).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (508, 'Sport1',
'amarkhel/Sport/sport (8).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (509, 'Sport1',
'amarkhel/Sport/sport (9).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (510, 'Sport1',
'amarkhel/Sport/sport (10).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (511, 'Sport1',
'amarkhel/Sport/sport (11).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (512, 'Sport1',
'amarkhel/Sport/sport (12).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (513, 'Sport1',
'amarkhel/Sport/sport (13).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (514, 'Sport1',
'amarkhel/Sport/sport (14).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (515, 'Sport1',
'amarkhel/Sport/sport (15).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (516, 'Sport1',
'amarkhel/Sport/sport (16).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (517, 'Sport1',
'amarkhel/Sport/sport (17).jpg', 'Where is the Batman?',
'2008-12-18', 20, 'Canon S3', 500, 20, 375, '2008-12-01');
+
+
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (557, 'Fun',
'amarkhel/Flowers/flowers.jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (558, 'Fun',
'amarkhel/Flowers/flowers (1).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (559, 'Fun',
'amarkhel/Flowers/flowers (2).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (560, 'Fun',
'amarkhel/Flowers/flowers (3).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (561, 'Fun',
'amarkhel/Flowers/flowers (4).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (562, 'Fun',
'amarkhel/Flowers/flowers (5).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (563, 'Fun',
'amarkhel/Flowers/flowers (6).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (564, 'Fun',
'amarkhel/Flowers/flowers (7).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (565, 'Fun',
'amarkhel/Flowers/flowers (8).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (566, 'Fun',
'amarkhel/Flowers/flowers (9).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (567, 'Fun',
'amarkhel/Flowers/flowers (10).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (568, 'Fun',
'amarkhel/Flowers/flowers (11).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (569, 'Fun',
'amarkhel/Flowers/flowers (12).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (570, 'Fun',
'amarkhel/Flowers/flowers (13).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (571, 'Fun',
'amarkhel/Flowers/flowers (14).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (572, 'Fun',
'amarkhel/Flowers/flowers (15).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (573, 'Fun',
'amarkhel/Flowers/flowers (16).jpg', 'Where is the Batman?',
'2008-12-18', 23, 'Canon S3', 500, 20, 375, '2008-12-01');
+
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (591, 'Fun',
'amarkhel/Beach/beach (1).jpg', 'Where is the Batman?',
'2008-12-18', 25, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (592, 'Fun',
'amarkhel/Beach/beach (2).jpg', 'Where is the Batman?',
'2008-12-18', 25, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (593, 'Fun',
'amarkhel/Beach/beach (3).jpg', 'Where is the Batman?',
'2008-12-18', 25, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (594, 'Fun',
'amarkhel/Beach/beach (4).jpg', 'Where is the Batman?',
'2008-12-18', 25, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (595, 'Fun',
'amarkhel/Beach/beach (5).jpg', 'Where is the Batman?',
'2008-12-18', 25, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (596, 'Fun',
'amarkhel/Beach/beach (6).jpg', 'Where is the Batman?',
'2008-12-18', 25, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (597, 'Fun',
'amarkhel/Beach/beach (7).jpg', 'Where is the Batman?',
'2008-12-18', 25, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (598, 'Fun',
'amarkhel/Beach/beach (8).jpg', 'Where is the Batman?',
'2008-12-18', 25, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (599, 'Fun',
'amarkhel/Beach/beach (9).jpg', 'Where is the Batman?',
'2008-12-18', 25, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (600, 'Fun',
'amarkhel/Beach/beach (10).jpg', 'Where is the Batman?',
'2008-12-18', 25, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (601, 'Fun',
'amarkhel/Beach/beach (11).jpg', 'Where is the Batman?',
'2008-12-18', 25, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (602, 'Fun',
'amarkhel/Beach/beach (12).jpg', 'Where is the Batman?',
'2008-12-18', 25, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (603, 'Fun',
'amarkhel/Beach/beach (13).jpg', 'Where is the Batman?',
'2008-12-18', 25, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (604, 'Fun',
'amarkhel/Beach/beach (14).jpg', 'Where is the Batman?',
'2008-12-18', 25, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (605, 'Fun',
'amarkhel/Beach/beach.jpg', 'Where is the Batman?', '2008-12-18',
25, 'Canon S3', 500, 20, 375, '2008-12-01');
+
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (606, 'Fun',
'amarkhel/Travel/travel (1).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (607, 'Fun',
'amarkhel/Travel/travel (2).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (608, 'Fun',
'amarkhel/Travel/travel (3).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (609, 'Fun',
'amarkhel/Travel/travel (4).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (610, 'Fun',
'amarkhel/Travel/travel (5).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (611, 'Fun',
'amarkhel/Travel/travel (6).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (612, 'Fun',
'amarkhel/Travel/travel (7).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (613, 'Fun',
'amarkhel/Travel/travel (8).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (614, 'Fun',
'amarkhel/Travel/travel (9).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (615, 'Fun',
'amarkhel/Travel/travel (10).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (616, 'Fun',
'amarkhel/Travel/travel (11).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (617, 'Fun',
'amarkhel/Travel/travel (12).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (618, 'Fun',
'amarkhel/Travel/travel (13).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (619, 'Fun',
'amarkhel/Travel/travel (14).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (620, 'Fun',
'amarkhel/Travel/travel (15).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (621, 'Fun',
'amarkhel/Travel/travel (16).jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 500, 20, 375, '2008-12-01');
+INSERT INTO images(image_id, name, path, description, created, img_album_id,
cameraModel, height, size, width, uploaded) VALUES (622, 'Fun',
'amarkhel/Travel/travel.jpg', 'Where is the Batman?',
'2008-12-18', 26, 'Canon S3', 500, 20, 375, '2008-12-01');
Modified:
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileUploadBean.java
===================================================================
---
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileUploadBean.java 2009-02-03
15:36:56 UTC (rev 12549)
+++
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileUploadBean.java 2009-02-03
16:00:20 UTC (rev 12550)
@@ -21,7 +21,6 @@
package org.richfaces.realworld.fileupload;
-import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
@@ -41,8 +40,6 @@
import org.richfaces.event.UploadEvent;
import org.richfaces.model.UploadItem;
import org.richfaces.realworld.domain.Image;
-import org.richfaces.realworld.domain.MetaTag;
-import org.richfaces.realworld.domain.Rank;
import org.richfaces.realworld.domain.User;
import org.richfaces.realworld.navigation.NavigationEnum;
import org.richfaces.realworld.service.Constants;
@@ -190,26 +187,13 @@
String albumPath =
conversationState.getSelectedAlbum().getAlbumPathFromParents(conversationState.getSelectedAlbum(),
Constants.SLASH, true);
image.setPath(user.getLogin() + Constants.SLASH + albumPath + item.getFileName());
- image.setAlbumName(conversationState.getSelectedAlbum().getName());
+ //image.setAlbumName(conversationState.getSelectedAlbum().getName());
image.setAlbum(conversationState.getSelectedAlbum());
- addRankToImage(image);
- addMetaTags(image);
+ //addRankToImage(image);
+ //addMetaTags(image);
return image;
}
- private void addMetaTags(Image image) {
- List<MetaTag> tags = new ArrayList<MetaTag>();
- image.setTags(tags);
- image.setMeta(new ArrayList<MetaTag>(tags));
- }
-
- private void addRankToImage(Image image) {
- Rank rank = new Rank();
- rank.setHits(0L);
- rank.setTotal(0L);
- image.setRank(rank);
- }
-
private void extractMetadata(FileItem file, Image image)
throws JpegProcessingException, MetadataException, FileNotFoundException {
InputStream in = new FileInputStream(file.getFile());
Modified:
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/AlbumManager.java
===================================================================
---
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/AlbumManager.java 2009-02-03
15:36:56 UTC (rev 12549)
+++
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/AlbumManager.java 2009-02-03
16:00:20 UTC (rev 12550)
@@ -20,7 +20,6 @@
*/
package org.richfaces.realworld.manager;
-import java.util.ArrayList;
import java.util.List;
import org.jboss.seam.ScopeType;
@@ -28,144 +27,25 @@
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Out;
import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.core.Events;
-import org.richfaces.model.TreeNode;
import org.richfaces.realworld.domain.Album;
-import org.richfaces.realworld.domain.User;
-import org.richfaces.realworld.fileupload.FileManager;
-import org.richfaces.realworld.service.Constants;
import org.richfaces.realworld.service.IAlbumAction;
-import org.richfaces.realworld.tree.TreeAlbumItem;
-import org.richfaces.realworld.tree.TreeMyAlbumsItem;
import org.richfaces.realworld.util.ConversationState;
@Name("albumManager")
-(a)Scope(ScopeType.CONVERSATION)
+(a)Scope(ScopeType.SESSION)
public class AlbumManager {
- @In(create=true, required=true)
- private IAlbumAction albumAction;
-
- @In("#{messages['album_present']}")
- private String ALBUM_WITH_THIS_NAME_ALREADY_PRESENT;
-
- @In(required=false, create=false) @Out(required=false) TreeMyAlbumsItem
treeMyAlbumsItem;
-
- private Integer firstIndex = 1;
-
- @In(create=true, required=true) @Out
- private Album album;
-
- private List<Album> sharedAlbums;
- @In
- private User user;
-
- @In(create=true)
- FileManager fileManager;
-
@In @Out
private ConversationState conversationState;
+ private List<Album> sharedAlbums;
- public void addAlbum(){
- albumAction.addAlbum(album);
- addAlbumToTree();
- addDirectory();
- //Update conversation state
- conversationState.setSelectedImage(null);
- conversationState.setSelectedAlbum(album);
- }
+ @In(create=true) IAlbumAction albumAction;
- public void editAlbum(Album album){
- boolean nameChanged = !album.getName().equals(album.getChangedName());
- if(nameChanged){
- Album oldAlbum = getOldTreeNode(album);
- if(!renameDirectory(album, oldAlbum)){
- Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT,
ALBUM_WITH_THIS_NAME_ALREADY_PRESENT);
- return;
- }
- renameImagesFromAlbum(album, oldAlbum);
- album.setName(album.getChangedName());
- album.setChangedName(null);
- }
- albumAction.editAlbum(album);
- treeMyAlbumsItem.updateChild(album);
- conversationState.setSelectedAlbum(album);
- }
-
- public void deleteAlbum(Album album){
- //Update domain model
- String albumName = album.getAlbumPathFromParents(album, fileManager.getFileSeparator(),
true);
- albumAction.deleteAlbum(album);
- removeFromTree(album);
- deleteDirectory(albumName);
- conversationState.setSelectedImage(null);
- conversationState.setSelectedAlbum(null);
- }
-
- private void renameImagesFromAlbum(Album album, Album oldAlbum) {
- String albumOld = getOldAlbumPath(album);
- String albumNew = getNewAlbumPath(album, oldAlbum);
- albumAction.renameAllImagesFromAlbumAndChilds(album, albumOld, albumNew);
- }
-
- private boolean renameDirectory(Album album, Album oldAlbum) {
- String directoryOld = getOldDirectory(album);
- String directoryNew = getNewDirectory(album, oldAlbum);
- return fileManager.renameDirectory(directoryOld, directoryNew);
- }
-
- private String getNewAlbumPath(Album album, Album oldAlbum) {
- return fileManager.concatwithSlash(user.getLogin(),
oldAlbum.getAlbumPathFromParents(oldAlbum, Constants.SLASH, false ),
album.getChangedName());
- }
-
- private String getOldAlbumPath(Album album) {
- return fileManager.concatwithSlash(user.getLogin(),
album.getAlbumPathFromParents(album, Constants.SLASH, true ));
- }
-
- private String getNewDirectory(Album album, Album oldAlbum) {
- return fileManager.concat(user.getLogin(), oldAlbum.getAlbumPathFromParents(oldAlbum,
fileManager.getFileSeparator(), false ), album.getChangedName());
- }
-
- private Album getOldTreeNode(Album album) {
- return ((TreeAlbumItem)treeMyAlbumsItem.getNode(album.getName())).getAlbum();
- }
-
- private String getOldDirectory(Album album) {
- return fileManager.concat(user.getLogin() ,album.getAlbumPathFromParents(album,
fileManager.getFileSeparator(), true ));
- }
-
- private void removeFromTree(Album album) {
- TreeAlbumItem oldAlbum = (TreeAlbumItem)treeMyAlbumsItem.getNode(album.getName());
- oldAlbum.getParent().removeChild(album.getId());
- }
-
- private void deleteDirectory(String albumName) {
- fileManager.deleteDirectory(user.getLogin(), albumName);
- }
-
- private void addDirectory() {
- String albumPath = album.getAlbumPathFromParents(album, fileManager.getFileSeparator(),
true) ;
- fileManager.addDirectory(user.getLogin(), albumPath);
- }
-
- private void addAlbumToTree() {
- TreeNode<Object> parent = findParentTreeNode();
- TreeAlbumItem albumItem = new TreeAlbumItem(album.getId(), parent, album,
treeMyAlbumsItem);
- treeMyAlbumsItem.addAlbumToTree(parent, albumItem);
- }
-
- private TreeNode<Object> findParentTreeNode() {
- if(null == album.getParent()){
- return treeMyAlbumsItem;
- }else{
- return treeMyAlbumsItem.getNode(album.getParent().getName());
- }
- }
-
public List<Album> getSharedAlbums(){
if(null == sharedAlbums){
sharedAlbums=albumAction.getSharedAlbums();
conversationState.setSelectedAlbum(sharedAlbums.get(0));
+ //conversationState.setSelectedImageIndex(1);
}
return sharedAlbums;
}
@@ -179,61 +59,7 @@
conversationState.setSelectedAlbum(a);
conversationState.setSelectedImage(null);
}
-
- public List<Integer> getAvailableIndeces() {
- return createArrayIndeces(firstIndex);
- }
-
- private List<Integer> createArrayIndeces(Integer firstIndex2) {
- List<Integer> indeces = new ArrayList<Integer>();
- boolean ok = firstIndex2 +10 <
conversationState.getSelectedAlbum().getImages().size();
- int addon;
- if(ok){
- addon = 10;
- }else{
- addon = conversationState.getSelectedAlbum().getImages().size() - firstIndex2;
- }
- for(int i = firstIndex2; i <= firstIndex2 + addon; i++){
- indeces.add(i);
- }
- return indeces;
- }
-
- public Integer getFirstIndex() {
- return firstIndex;
- }
-
- public void setFirstIndex(Integer firstIndex) {
- this.firstIndex = firstIndex;
- }
- public void prevIndeces(){
- if(firstIndex>10){
- firstIndex -=10;
- }
- else firstIndex = 1;
- conversationState.setSelectedImage(conversationState.getSelectedAlbum().getImages().get(firstIndex));
- }
-
- public void nextIndeces(){
- if(nextAvailable()){
- firstIndex +=10;
- }
- conversationState.setSelectedImage(conversationState.getSelectedAlbum().getImages().get(firstIndex));
- }
-
- public boolean prevDisabled(){
- return firstIndex > 10;
- }
-
- public boolean nextDisabled(){
- return nextAvailable();
- }
-
- private boolean nextAvailable() {
- return firstIndex +10 < conversationState.getSelectedAlbum().getImages().size();
- }
-
public void selectImage(int index){
conversationState.setSelectedImage(conversationState.getSelectedAlbum().getImages().get(index
-1));
}
Modified:
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/Authenticator.java
===================================================================
---
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/Authenticator.java 2009-02-03
15:36:56 UTC (rev 12549)
+++
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/Authenticator.java 2009-02-03
16:00:20 UTC (rev 12550)
@@ -116,9 +116,8 @@
User user = userAction.login(credentials.getUsername(), credentials.getPassword());
if (user != null) {
identity.addRole(Constants.ADMIN_ROLE);
- setupCatalogForUser();
- conversationState.setSelectedUser(user);
- Events.instance().raiseEvent(Constants.UPDATE_MAIN_AREA_EVENT,NavigationEnum.IMAGE_PREVIEW);
+ //setupCatalogForUser();
+ //Events.instance().raiseEvent(Constants.UPDATE_MAIN_AREA_EVENT,NavigationEnum.IMAGE_PREVIEW);
return true;
}
} catch (Exception nre) {
Modified:
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/DnDManager.java
===================================================================
---
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/DnDManager.java 2009-02-03
15:36:56 UTC (rev 12549)
+++
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/DnDManager.java 2009-02-03
16:00:20 UTC (rev 12550)
@@ -104,7 +104,7 @@
private void renameImagesFromAlbum(Album dragValue) {
String albumOld = fileManager.concatwithSlash(user.getLogin(),
dragValue.getAlbumPathFromParents(dragValue, Constants.SLASH, false ));
String albumNew = user.getLogin() + Constants.SLASH;
- albumAction.renameAllImagesFromAlbumAndChilds(dragValue, albumOld, albumNew);
+ //albumAction.renameAllImagesFromAlbumAndChilds(dragValue, albumOld, albumNew);
}
private void updateRootTreeNode(Album dragValue, TreeAlbumItem itemParent) {
@@ -150,7 +150,7 @@
TreeNode<Object> itemParent) {
String albumOld = fileManager.concatwithSlash(user.getLogin(),
dragValue.getAlbumPathFromParents(dragValue, Constants.SLASH, false ));
String albumNew = fileManager.concatwithSlash(user.getLogin()
,dropValue.getAlbumPathFromParents(dropValue, Constants.SLASH, false));
- albumAction.renameAllImagesFromAlbumAndChilds(dragValue, albumOld, albumNew);
+ //albumAction.renameAllImagesFromAlbumAndChilds(dragValue, albumOld, albumNew);
dropValue.addChildAlbum(dragValue);
updateTree(dragValue, dropValue, itemParent);
}
@@ -170,7 +170,7 @@
String newPath = getNewPathOfImage(dragValue, dropValue);
dragValue.setPath(newPath);
dropValue.addImage(dragValue);
- albumAction.flush();
+ //albumAction.flush();
}
private String getNewPathOfImage(Image dragValue, Album dropValue) {
Modified:
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/ImageManager.java
===================================================================
---
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/ImageManager.java 2009-02-03
15:36:56 UTC (rev 12549)
+++
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/ImageManager.java 2009-02-03
16:00:20 UTC (rev 12550)
@@ -20,8 +20,6 @@
*/
package org.richfaces.realworld.manager;
-import java.util.Date;
-
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
@@ -30,7 +28,6 @@
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.core.Events;
import org.richfaces.realworld.domain.Album;
-import org.richfaces.realworld.domain.Comment;
import org.richfaces.realworld.domain.Image;
import org.richfaces.realworld.domain.User;
import org.richfaces.realworld.fileupload.FileManager;
@@ -85,52 +82,22 @@
conversationState.setSelectedImage(image);
conversationState.setSelectedAlbum(albumItem.getAlbum());
}
- imageAction.editImage(image, parentChanged);
+ //imageAction.editImage(image, parentChanged);
setOncomplete();
}
@Observer(Constants.ADD_IMAGE_EVENT)
public void addImage(Image image) {
- imageAction.addImage(image);
+ //imageAction.addImage(image);
TreeAlbumItem albumItem =
(TreeAlbumItem)treeMyAlbumsItem.getNode(image.getAlbumName());
conversationState.setSelectedAlbum(albumItem.getAlbum());
Events.instance().raiseEvent(Constants.UPDATE_MAIN_AREA_EVENT,
NavigationEnum.IMAGE_PREVIEW);
//setOncomplete();
}
+
- public void editComment(Comment comment) {
- imageAction.editComment(comment);
- }
-
- public void addAutoComment(Image image) {
- if(null == user.getLogin()){
- Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, new Exception("For vote
on this picture you must login"));
- return;
- }
- Comment comment = new Comment();
- comment.setAuthor(user);
- comment.setDate(new Date());
- comment.setImage(image);
- comment.setMessage("+1");
- imageAction.addComment(comment);
- }
-
- public void addComment(Image image, String message){
- if(null == user.getLogin()){
- Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, new Exception("For vote
on this picture you must login"));
- return;
- }
- Comment comment= new Comment();
- comment.setAuthor(user);
- comment.setImage(image);
- comment.setDate(new Date());
- comment.setMessage(message);
- imageAction.addComment(comment);
- Events.instance().raiseEvent(Constants.CLEAR_EDITOR_EVENT, "");
- }
-
public void vote(Image image){
- imageAction.vote(image,
Long.valueOf(ratingBinder.getInputSlider().getValue().toString()));
+ //imageAction.vote(image,
Long.valueOf(ratingBinder.getInputSlider().getValue().toString()));
}
private void setOncomplete() {
Modified:
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/MessageManager.java
===================================================================
---
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/MessageManager.java 2009-02-03
15:36:56 UTC (rev 12549)
+++
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/MessageManager.java 2009-02-03
16:00:20 UTC (rev 12550)
@@ -21,20 +21,12 @@
package org.richfaces.realworld.manager;
import java.io.Serializable;
-import java.util.Date;
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Out;
import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.core.Events;
-import org.richfaces.realworld.domain.Message;
import org.richfaces.realworld.domain.User;
-import org.richfaces.realworld.navigation.NavigationEnum;
-import org.richfaces.realworld.service.IMessageAction;
-import org.richfaces.realworld.ui.History;
-import org.richfaces.realworld.service.Constants;
@Name("messageManager")
@Scope(ScopeType.CONVERSATION)
@@ -45,104 +37,4 @@
@In
private User user;
- private Message message;
-
- private Message messageForSend;
-
- private Long countUnreadedMessages;
-
- @In(create=true) @Out(required=false)
- private History history;
-
- @In(create=true) IMessageAction messageAction;
- public void closeMessage(){
- this.message = null;
- this.messageForSend = null;
- }
-
- public void showHistory(User u){
- Events.instance().raiseEvent(Constants.UPDATE_MAIN_AREA_EVENT,
NavigationEnum.READ_MESSAGES);
- history.setSelected(true);
- history.setHistoryUser(u);
- }
-
- public void initMessage(Message message, User owner, String theme, String content,
boolean isFrRequest){
- if(message == null){
- this.message = null;
- }else{
- this.message=message;
- this.message.setReaded(true);
- this.setCountUnreadedMessages(null);
- }
- if(owner == null){
- this.messageForSend = null;
- }else{
- this.messageForSend = new Message();
- this.messageForSend.setAuthor(user);
- if(theme.startsWith(Constants.RE)){
- this.messageForSend.setTheme(theme + this.message.getTheme());
- }else{
- this.messageForSend.setTheme(theme);
- }
- this.messageForSend.setOwner(owner);
- this.messageForSend.setMessage(content);
- this.messageForSend.setFriendshipRequest(isFrRequest);
- }
- Events.instance().raiseEvent(Constants.UPDATE_MAIN_AREA_EVENT,
NavigationEnum.READ_MESSAGES);
- }
-
- public void initMessage(){
- this.message = null;
- this.messageForSend = new Message();
- this.messageForSend.setAuthor(user);
- this.messageForSend.setFriendshipRequest(false);
- }
-
- public void sendMessage(){
- this.messageForSend.setDate(new Date());
- messageAction.sendMessage(this.message);
- this.message = null;
- this.messageForSend = null;
- }
-
- public void markAsReaded(Message message){
- messageAction.markAsReaded(message);
- this.setCountUnreadedMessages(null);
- }
-
- public void deleteMessage(Message message){
- messageAction.deleteMessage(message);
- this.setCountUnreadedMessages(null);
- }
-
- public Long getCountUnreadedMessages() {
- if(null == countUnreadedMessages){
- countUnreadedMessages = messageAction.countNotReadedMessages(user);
- }
- return countUnreadedMessages != null ? countUnreadedMessages : 0;
- }
-
- public void setCountUnreadedMessages(Long count){
- countUnreadedMessages = null;
- }
-
- public Message getMessage() {
- return message;
- }
-
- public void setMessage(Message message) {
- this.message = message;
- }
-
- public Message getMessageForSend() {
- return messageForSend;
- }
-
- public void setMessageForSend(Message messageForSend) {
- this.messageForSend = messageForSend;
- }
-
- public void sendMessage(Message message) {
- messageAction.sendMessage(message);
- }
}
Modified:
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/UserManager.java
===================================================================
---
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/UserManager.java 2009-02-03
15:36:56 UTC (rev 12549)
+++
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/UserManager.java 2009-02-03
16:00:20 UTC (rev 12550)
@@ -21,7 +21,6 @@
package org.richfaces.realworld.manager;
import java.io.Serializable;
-import java.util.Date;
import java.util.List;
import org.jboss.seam.ScopeType;
@@ -29,16 +28,11 @@
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Out;
import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.core.Events;
import org.richfaces.realworld.domain.Album;
-import org.richfaces.realworld.domain.FriendshipRequest;
import org.richfaces.realworld.domain.Image;
-import org.richfaces.realworld.domain.Message;
import org.richfaces.realworld.domain.User;
import org.richfaces.realworld.service.IUserAction;
-import org.richfaces.realworld.tree.TreeFriendItem;
import org.richfaces.realworld.tree.TreeFriendsItem;
-import org.richfaces.realworld.service.Constants;
@Name("userManager")
@Scope(ScopeType.CONVERSATION)
@@ -66,46 +60,8 @@
return suggestions;
}
- public void removeFromFriends(User owner, User removed){
- userAction.removeFromFriends(owner, removed);
- treeFriendsItem.removeChild(removed.getId());
- Message message = new Message();
- message.setAuthor(user);
- message.setDate(new Date());
- message.setOwner(removed);
- message.setFriendshipRequest(false);
- message.setReaded(false);
- message.setMessage(YOU_ARE_WERE_REMOVED_FROM_FRIENDS_MESSAGE+ user.getLogin());
- message.setTheme(REMOVED_FROM_FRIENDS_MESSAGE_THEME);
- Events.instance().raiseEvent(Constants.SEND_MESSAGE_EVENT, message);
- }
- public void addToFriends(User friend){
- FriendshipRequest request = friend.getFriendshipRequest(user, friend);
- if(request != null){
- if(!userAction.friendExist(user, friend)){
- userAction.addFriend(user, friend, request);
- TreeFriendItem friendItem = new TreeFriendItem(friend.getId(), treeFriendsItem,
friend);
- treeFriendsItem.addChild(friend.getId(), friendItem );
- sendAcquireMessage(friend);
- }
- }else{
- Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, new
Exception(FRIEND_ERROR_MESSAGE));
- return;
- }
- }
- private void sendAcquireMessage(User friend) {
- Message message = new Message();
- message.setAuthor(user);
- message.setDate(new Date());
- message.setOwner(friend);
- message.setFriendshipRequest(false);
- message.setReaded(false);
- message.setMessage(ADDED_TO_FRIENDS_MESSAGE+ user.getLogin());
- message.setTheme(ADDED_TO_FRIENDS_MESSAGE_THEME);
- Events.instance().raiseEvent(Constants.SEND_MESSAGE_EVENT, message);
- }
public void addToFavoriteAlbums(Album album){
userAction.addFavoriteAlbum(album);
Modified:
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/AlbumPopupHelper.java
===================================================================
---
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/AlbumPopupHelper.java 2009-02-03
15:36:56 UTC (rev 12549)
+++
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/AlbumPopupHelper.java 2009-02-03
16:00:20 UTC (rev 12550)
@@ -81,7 +81,7 @@
}
public void editAlbum(ActionEvent event){
- albumManager.editAlbum(this.album);
+ //albumManager.editAlbum(this.album);
setOncomplete();
}
@@ -107,7 +107,7 @@
public void addAlbum(ActionEvent event){
this.album.setParent(parent);
- albumManager.addAlbum();
+ //albumManager.addAlbum();
setOncomplete();
}
Modified:
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/ConfirmationPopupHelper.java
===================================================================
---
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/ConfirmationPopupHelper.java 2009-02-03
15:36:56 UTC (rev 12549)
+++
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/ConfirmationPopupHelper.java 2009-02-03
16:00:20 UTC (rev 12550)
@@ -21,7 +21,6 @@
package org.richfaces.realworld.modalpanel;
import java.io.Serializable;
-import java.util.ArrayList;
import javax.faces.event.ActionEvent;
@@ -32,7 +31,6 @@
import org.jboss.seam.annotations.Scope;
import org.richfaces.realworld.domain.Album;
import org.richfaces.realworld.domain.Image;
-import org.richfaces.realworld.domain.MetaTag;
import org.richfaces.realworld.manager.AlbumManager;
import org.richfaces.realworld.manager.ImageManager;
@@ -63,7 +61,7 @@
this.actionName = actionName;
if(null != image){
this.image = image;
- image.setMeta(new ArrayList<MetaTag>(image.getTags()));
+ //image.setMeta(new ArrayList<MetaTag>(image.getTags()));
}else{
this.image = new Image();
}
@@ -80,7 +78,7 @@
}
public void deleteAlbum(ActionEvent event){
- albumManager.deleteAlbum(this.album);
+ //albumManager.deleteAlbum(this.album);
}
public String getCaption() {
Modified:
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/ImagePopupHelper.java
===================================================================
---
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/ImagePopupHelper.java 2009-02-03
15:36:56 UTC (rev 12549)
+++
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/ImagePopupHelper.java 2009-02-03
16:00:20 UTC (rev 12550)
@@ -21,7 +21,6 @@
package org.richfaces.realworld.modalpanel;
import java.io.Serializable;
-import java.util.ArrayList;
import javax.faces.event.ActionEvent;
@@ -31,7 +30,6 @@
import org.jboss.seam.annotations.Out;
import org.jboss.seam.annotations.Scope;
import org.richfaces.realworld.domain.Image;
-import org.richfaces.realworld.domain.MetaTag;
import org.richfaces.realworld.manager.ImageManager;
@Name("imagePopupHelper")
@@ -49,7 +47,7 @@
public void initImagePopup(Image image){
if(null != image){
this.image = image;
- image.setMeta(new ArrayList<MetaTag>(image.getTags()));
+ //image.setMeta(new ArrayList<MetaTag>(image.getTags()));
}else{
this.image = new Image();
}
Modified:
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/test.java
===================================================================
---
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/test.java 2009-02-03
15:36:56 UTC (rev 12549)
+++
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/test.java 2009-02-03
16:00:20 UTC (rev 12550)
@@ -26,7 +26,7 @@
* @throws IOException
*/
public static void main(String[] args) throws IOException {
- String directory ="C:\\Documents and
Settings\\Administrator\\Desktop\\amarkhel\\Sport";
+ String directory
="E:\\richfaces\\test-applications\\realworld\\web\\src\\main\\webapp\\WEB-INF\\Upload\\amarkhel\\Art";
writeFiles(directory, "_mini", 150);
writeFiles(directory, "_medium", 600);
}
Modified:
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/servlet/PictureServlet.java
===================================================================
---
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/servlet/PictureServlet.java 2009-02-03
15:36:56 UTC (rev 12549)
+++
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/servlet/PictureServlet.java 2009-02-03
16:00:20 UTC (rev 12550)
@@ -110,7 +110,7 @@
String userId = request.getParameter(Constants.USER_ID);
EntityManager em = (EntityManager)Component.getInstance(Constants.ENTITY_MANAGER,
true);
User user = null;
- if(userId != null){
+ if(userId != null && !userId.equals("")){
user = em.find(User.class, Long.valueOf(userId));
}
Image i = (Image)em.createQuery("from Image i where
i.path=:path").setParameter(Constants.PATH_PARAMETER,
pathInfo.substring(1)).getSingleResult();
Modified:
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/ui/History.java
===================================================================
---
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/ui/History.java 2009-02-03
15:36:56 UTC (rev 12549)
+++
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/ui/History.java 2009-02-03
16:00:20 UTC (rev 12550)
@@ -20,13 +20,10 @@
*/
package org.richfaces.realworld.ui;
-import java.util.List;
-
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
-import org.richfaces.realworld.domain.Message;
import org.richfaces.realworld.domain.User;
import org.richfaces.realworld.service.IUserAction;
@@ -54,9 +51,6 @@
this.setHistoryUser(u);
}
- public List<Message> getHistory(){
- return userAction.getHistory(this.getHistoryUser());
- }
public User getHistoryUser() {
return historyUser;
Modified:
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/ui/MetaInformationBinder.java
===================================================================
---
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/ui/MetaInformationBinder.java 2009-02-03
15:36:56 UTC (rev 12549)
+++
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/ui/MetaInformationBinder.java 2009-02-03
16:00:20 UTC (rev 12550)
@@ -20,16 +20,11 @@
*/
package org.richfaces.realworld.ui;
-import java.util.HashSet;
import java.util.Set;
-import javax.faces.context.FacesContext;
-
import org.ajax4jsf.component.UIRepeat;
import org.jboss.seam.annotations.Name;
import org.richfaces.component.html.HtmlInputText;
-import org.richfaces.realworld.domain.Image;
-import org.richfaces.realworld.domain.MetaTag;
@Name(value="metainfBinder")
public class MetaInformationBinder {
@@ -61,29 +56,5 @@
public void setMetaRef(HtmlInputText metaRef) {
this.metaRef = metaRef;
}
-
- public String change(Image image){
- Set<Integer> keys = new HashSet<Integer>();
- int rowKey = getRepeater().getRowIndex();
- keys.add(rowKey);
- setKeys(keys);
- metaRef.processValidators(FacesContext.getCurrentInstance());
- metaRef.processUpdates(FacesContext.getCurrentInstance());
- MetaTag metaTag = new MetaTag();
- metaTag.setTag(metaRef.getValue().toString());
- metaTag.setParent(image);
- image.getMeta().add(metaTag);
- return null;
- }
-
- public void addTag(Image image){
- MetaTag metaTag = new MetaTag();
- metaTag.setTag("");
- metaTag.setParent(image);
- image.getMeta().add(metaTag);
- }
-
- public void removeTag(MetaTag tag, Image image){
- image.getMeta().remove(tag);
- }
+
}
Modified:
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ConversationState.java
===================================================================
---
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ConversationState.java 2009-02-03
15:36:56 UTC (rev 12549)
+++
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ConversationState.java 2009-02-03
16:00:20 UTC (rev 12550)
@@ -21,46 +21,26 @@
package org.richfaces.realworld.util;
import java.io.Serializable;
-import java.util.List;
import java.util.Map;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
-import javax.faces.model.SelectItem;
import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Observer;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.Synchronized;
-import org.jboss.seam.core.Events;
import org.richfaces.component.UIDatascroller;
-import org.richfaces.component.UITree;
-import org.richfaces.component.html.HtmlTree;
-import org.richfaces.event.DataScrollerEvent;
-import org.richfaces.event.NodeSelectedEvent;
-import org.richfaces.model.TreeNode;
-import org.richfaces.model.TreeRowKey;
import org.richfaces.realworld.domain.Album;
import org.richfaces.realworld.domain.Image;
-import org.richfaces.realworld.domain.User;
import org.richfaces.realworld.navigation.NavigationEnum;
import org.richfaces.realworld.service.Constants;
-import org.richfaces.realworld.tree.TreeAlbumItem;
-import org.richfaces.realworld.tree.TreeFriendItem;
-import org.richfaces.realworld.tree.TreeFriendsItem;
-import org.richfaces.realworld.tree.TreeMyAlbumsItem;
@Name("conversationState")
-(a)Scope(ScopeType.CONVERSATION)
-@Synchronized(timeout=200000)
+(a)Scope(ScopeType.SESSION)
public class ConversationState implements Serializable{
private static final long serialVersionUID = 5656562187249324512L;
-
- @In("#{messages['acess_not_granted']}")
- private String HAVENT_ACCESS;
private Integer selectedImageIndex = 1;
@@ -68,15 +48,8 @@
private Album selectedAlbum;
- private User selectedUser;
-
- private User secondSelectedUser;
-
private NavigationEnum mainArea;
- @In private User user;
- @In(required=false, create=false) private TreeMyAlbumsItem treeMyAlbumsItem;
-
public Integer getSelectedImageIndex() {
return selectedImageIndex;
}
@@ -84,14 +57,6 @@
public NavigationEnum getMainArea() {
return mainArea;
}
-
- @Observer(Constants.UPDATE_MAIN_AREA_EVENT)
- public void setMainArea(NavigationEnum mainArea) {
- this.mainArea = mainArea;
- if(mainArea.equals(NavigationEnum.FILE_UPLOAD)){
- Events.instance().raiseEvent(Constants.SHOW_FILE_UPLOAD_EVENT, true);
- }
- }
public void setSelectedImageIndex(Integer selectedImageIndex) {
this.selectedImageIndex = selectedImageIndex;
@@ -119,278 +84,39 @@
}
return selectedAlbum.getAlbumPathFromParents(selectedAlbum, Constants.SLASH, true);
}
-
- public void setSelectedAlbumName(String selectedAlbumName) {
- selectedAlbumName = selectedAlbumName.substring(0, selectedAlbumName.length() -1);
- int lastIndexOf = selectedAlbumName.lastIndexOf(Constants.SLASH);
- String prevPathEnd = selectedAlbumName.substring(lastIndexOf+1);
- this.selectedAlbum =
((TreeAlbumItem)treeMyAlbumsItem.getNode(prevPathEnd)).getAlbum();
- }
- public void showUserProfile(User user){
- setSelectedUser(user);
- setSecondSelectedUser(null);
- Events.instance().raiseEvent(Constants.UPDATE_MAIN_AREA_EVENT,
NavigationEnum.USER_PREFS);
- }
-
- public void showSecondUserProfile(User user){
- setSecondSelectedUser(user);
- Events.instance().raiseEvent(Constants.UPDATE_MAIN_AREA_EVENT,
NavigationEnum.USER_PREFS);
- }
-
public void showImage(Image image){
- if(!image.getAlbum().isShared() && !image.getAlbum().getOwner().equals(user)
&& !user.getFriends().contains(image.getAlbum().getOwner())){
- Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, new
Exception(HAVENT_ACCESS));
- return;
- }
- Events.instance().raiseEvent(Constants.UPDATE_MAIN_AREA_EVENT,
NavigationEnum.IMAGE_PREVIEW);
setSelectedAlbum(image.getAlbum());
setSelectedImage(image);
- setSelectedImageIndex(image.getAlbum().getIndex(image) + 1);
- setSelectedUser(image.getAlbum().getOwner());
- }
-
- public void showUser(User u){
- Events.instance().raiseEvent(Constants.UPDATE_MAIN_AREA_EVENT,
NavigationEnum.IMAGE_PREVIEW);
- setSelectedAlbum(null);
- setSelectedImage(null);
- setSelectedUser(u);
- }
-
- /*private void setDataScrollerIndex(int index) {
+ Integer index = getSelectedAlbum().getIndex(getSelectedImage());
UIComponent component = FacesContext.getCurrentInstance().getViewRoot();
UIDatascroller scroller =
(UIDatascroller)component.findComponent(Constants.DATASCROLLER_ID);
Map<String, Object> attributes = scroller.getDataTable().getAttributes();
attributes.put(UIDatascroller.SCROLLER_STATE_ATTRIBUTE, index+1);
setSelectedImageIndex(index+1);
- }*/
+ }
public void showAlbum(Album album){
- if(!album.isShared() && !album.getOwner().equals(user) &&
!user.getFriends().contains(album.getOwner())){
- Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, new
Exception(HAVENT_ACCESS));
- return;
- }
- Events.instance().raiseEvent(Constants.UPDATE_MAIN_AREA_EVENT,
NavigationEnum.IMAGE_PREVIEW);
setSelectedAlbum(album);
setSelectedImage(null);
- setSelectedUser(album.getOwner());
}
-
- public void selectMyAlbums(){
- setSelectedAlbum(null);
- setSelectedImage(null);
- setSelectedUser(user);
- }
- public void selectMyFriends(){
- setSelectedAlbum(null);
- setSelectedImage(null);
- setSelectedUser(null);
- }
-
- public void selectUser(User u){
- setSelectedAlbum(null);
- setSelectedImage(null);
- setSelectedUser(u);
- }
-
public void selectAlbum(Album a){
setSelectedAlbum(a);
setSelectedImage(null);
- setSelectedUser(a.getOwner());
}
-/* public void showFileUpload(TreeAlbumItem item, boolean singleMode){
- String i;
- if(singleMode){
- i=Constants.SINGLE;
- }else{
- i=Constants.MULTY;
- }
- Events.instance().raiseEvent(Constants.CHANGE_MODE_FILE_UPLOAD_EVENT, i);
- Events.instance().raiseEvent(Constants.FILE_UPLOAD_CLEAR_EVENT);
- setSelectedAlbum(item.getAlbum());
- this.setMainArea(NavigationEnum.FILE_UPLOAD);
- }*/
-
- public void showFileUpload(Album item){
- Events.instance().raiseEvent(Constants.FILE_UPLOAD_CLEAR_EVENT);
- setSelectedAlbum(item);
- this.setMainArea(NavigationEnum.FILE_UPLOAD);
- }
-
- @SuppressWarnings("unchecked")
- public Boolean adviseNodeSelected(UITree tree) {
- TreeRowKey<Object> treeRowKey = (TreeRowKey<Object>) tree.getRowKey();
- TreeNode<Object> treeNode = (TreeNode<Object>)
tree.getRowData(treeRowKey);
- if (treeNode instanceof TreeAlbumItem) {
- TreeAlbumItem currentNode = (TreeAlbumItem) treeNode;
- boolean selected = currentNode.getAlbum() == getSelectedAlbum() ||
currentNode.containAlbum(getSelectedAlbum());
- return selected;
- }
- return null;
- }
-
- @SuppressWarnings("unchecked")
- public Boolean adviseNodeOpened(UITree tree) {
- TreeRowKey<Object> treeRowKey = (TreeRowKey<Object>) tree.getRowKey();
- TreeNode<Object> treeNode = (TreeNode<Object>)
tree.getRowData(treeRowKey);
- if (treeNode instanceof TreeAlbumItem) {
- TreeAlbumItem currentNode = (TreeAlbumItem) treeNode;
- boolean selected = currentNode.getAlbum() == getSelectedAlbum() ||
currentNode.containAlbum(getSelectedAlbum());
- return selected;
- }
- return null;
- }
-
- @SuppressWarnings("unchecked")
- public void processSelection(NodeSelectedEvent event) {
- Events.instance().raiseEvent(Constants.UPDATE_MAIN_AREA_EVENT,
NavigationEnum.IMAGE_PREVIEW);
- HtmlTree tree = (HtmlTree) event.getComponent();
- TreeNode<Object> currentNode =
(TreeNode<Object>)tree.getModelTreeNode(tree.getRowKey());
- if(currentNode instanceof TreeAlbumItem){
- TreeAlbumItem node = (TreeAlbumItem)currentNode;
- Album album = node.getAlbum();
- setSelectedAlbum(album);
- }else if(currentNode instanceof TreeMyAlbumsItem){
- setSelectedAlbum(null);
- }
- setSelectedUser(user);
- setSelectedImage(null);
- }
-
- @SuppressWarnings("unchecked")
- public void processSelectionFriends(NodeSelectedEvent event) {
- Events.instance().raiseEvent(Constants.UPDATE_MAIN_AREA_EVENT,
NavigationEnum.IMAGE_PREVIEW);
- HtmlTree tree = (HtmlTree) event.getComponent();
- TreeNode<Object> currentNode =
(TreeNode<Object>)tree.getModelTreeNode(tree.getRowKey());
- if(currentNode instanceof TreeAlbumItem){
- TreeAlbumItem node = (TreeAlbumItem)currentNode;
- setSelectedUser(((TreeAlbumItem)currentNode).getAlbum().getOwner());
- Album album = node.getAlbum();
- setSelectedAlbum(album);
- }else if(currentNode instanceof TreeFriendsItem){
- setSelectedUser(null);
- setSelectedAlbum(null);
- }else if(currentNode instanceof TreeFriendItem){
- setSelectedUser(((TreeFriendItem)currentNode).getFriend());
- setSelectedAlbum(null);
- }
- setSelectedImage(null);
- }
-
public boolean isSelectedImage(int index){
return getSelectedAlbum().getIndex(getSelectedImage()) == index -1;
}
- public void incrementSlideShowIndex() {
- int index = getSelectedAlbum().getIndex(getSelectedImage());
- if(getSelectedAlbum().getImages().size() == index +1){
- index = -1;
- }
- setSelectedImage(getSelectedAlbum().getImages().get(index +1));
- setSelectedImageIndex(index+2);
- }
-
- public boolean isFirstExist(){
- int index = getSelectedAlbum().getIndex(getSelectedImage());
- return index > 0;
- }
-
- public boolean isLastExist(){
- int index = getSelectedAlbum().getIndex(getSelectedImage());
- int size = getSelectedAlbum().getCountImages();
- return index < size - 1;
- }
-
- public boolean isNextExist(){
- int index = getSelectedAlbum().getIndex(getSelectedImage());
- int size = getSelectedAlbum().getCountImages();
- return index < size - 1;
- }
-
- public boolean isPrevExist(){
- int index = getSelectedAlbum().getIndex(getSelectedImage());
- return index > 0;
- }
-
- public void setNextIndex(){
- int index = getSelectedAlbum().getIndex(getSelectedImage());
- setSelectedImage(getSelectedAlbum().getImages().get(index +1));
- setSelectedImageIndex(index+2);
- }
-
- public void setPrevIndex(){
- int index = getSelectedAlbum().getIndex(getSelectedImage());
- setSelectedImage(getSelectedAlbum().getImages().get(index - 1));
- setSelectedImageIndex(index - 2);
- }
-
- public void setLastIndex(){
- int size = getSelectedAlbum().getCountImages();
- setSelectedImage(getSelectedAlbum().getImages().get(size - 1));
- setSelectedImageIndex(size);
- }
-
- public void setFirstIndex(){
- setSelectedImage(getSelectedAlbum().getImages().get(0));
- setSelectedImageIndex(1);
- }
-
- /*public void scrollerListener(DataScrollerEvent event) {
- List<Image> images = getSelectedAlbum().getImages();
- if (event.getNewScrolVal().equals(Constants.PREVIOUS)) {
- for(int index = 0 ; index < images.size(); index++){
- if(images.get(index) ==getSelectedImage()){
- setSelectedImage(images.get(index - 1));
- setSelectedImageIndex(index);
- }
- }
- } else if (event.getNewScrolVal().equals(Constants.LAST)) {
- setSelectedImage(images.get(images.size() - 1));
- setSelectedImageIndex(images.size());
- } else if (event.getNewScrolVal().equals(Constants.NEXT)) {
- for(int index = 0 ; index < images.size(); index++){
- if(images.get(index) == getSelectedImage()){
- setSelectedImage(images.get(index + 1));
- setSelectedImageIndex(index + 2);
- return;
- }
- }
- } else if (event.getNewScrolVal().equals(Constants.FIRST)) {
- setSelectedImage(images.get(0));
- setSelectedImageIndex(1);
- }
-
- }*/
-
- /*public SelectItem[] getAvailableIndexOfImages(){
- SelectItem[] group = new SelectItem[getSelectedAlbum().getImages().size()];
- for(int i = 0; i < getSelectedAlbum().getImages().size(); i++){
- group[i] = new SelectItem(i+1);
- }
- return group;
- }*/
-
public void updateSelectedItems(Image image){
setSelectedImage(image);
Integer index = getSelectedAlbum().getIndex(getSelectedImage());
+ UIComponent component = FacesContext.getCurrentInstance().getViewRoot();
+ UIDatascroller scroller =
(UIDatascroller)component.findComponent(Constants.DATASCROLLER_ID);
+ Map<String, Object> attributes = scroller.getDataTable().getAttributes();
+ attributes.put(UIDatascroller.SCROLLER_STATE_ATTRIBUTE, index+1);
setSelectedImageIndex(index+1);
}
-
- public User getSelectedUser() {
- return selectedUser;
- }
-
- public void setSelectedUser(User selectedUser) {
- this.selectedUser = selectedUser;
- }
-
- public User getSecondSelectedUser() {
- return secondSelectedUser;
- }
-
- public void setSecondSelectedUser(User secondSelectedUser) {
- this.secondSelectedUser = secondSelectedUser;
- }
}
Modified:
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/RenderLogic.java
===================================================================
---
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/RenderLogic.java 2009-02-03
15:36:56 UTC (rev 12549)
+++
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/RenderLogic.java 2009-02-03
16:00:20 UTC (rev 12550)
@@ -43,7 +43,7 @@
private static final long serialVersionUID = 5656562187249324512L;
- public boolean shouldRenderFriendFolders(){
+/* public boolean shouldRenderFriendFolders(){
return conversationState.getSelectedUser() == null;
}
@@ -65,7 +65,7 @@
public boolean isSecondUserProfileSelected(){
return conversationState.getSecondSelectedUser() != null;
- }
+ }*/
public boolean isUserAlbumSelected(){
return conversationState.getSelectedAlbum() != null &&
conversationState.getSelectedAlbum().getOwner().equals(user);
@@ -87,25 +87,25 @@
return conversationState.getSelectedAlbum()!=null &&
conversationState.getSelectedAlbum().getOwner().equals(user);
}
- public boolean isUserSelected(){
+ /*public boolean isUserSelected(){
return user.equals(conversationState.getSelectedUser());
}
public boolean isFriendSelected(){
return conversationState.getSelectedUser() == null || isUserFriend();
- }
+ }*/
- public boolean isNotFriendSelected(){
+ /*public boolean isNotFriendSelected(){
return !isUserSelected() && !isUserFriend();
}
public boolean isUserFriend(){
return user.getFriends() != null &&
user.getFriends().contains(conversationState.getSelectedUser());
- }
+ }*/
- public boolean isUserFriend(User u){
+ /*public boolean isUserFriend(User u){
return user.getFriends() != null && user.getFriends().contains(u);
- }
+ }*/
public boolean isAlbumSelected(){
return conversationState.getSelectedAlbum() != null;
@@ -115,9 +115,9 @@
return conversationState.getSelectedImage() != null;
}
- public boolean isAccessToAlbumGranted(Album album){
+ /*public boolean isAccessToAlbumGranted(Album album){
return album.getOwner().equals(user) || album.isShared() ||
isUserFriend(album.getOwner());
- }
+ }*/
public boolean isUserAlbum(Album album){
if(album == null){
Modified:
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/RenderLogic2.java
===================================================================
---
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/RenderLogic2.java 2009-02-03
15:36:56 UTC (rev 12549)
+++
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/RenderLogic2.java 2009-02-03
16:00:20 UTC (rev 12550)
@@ -28,29 +28,24 @@
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.security.Identity;
-import org.richfaces.realworld.domain.Album;
-import org.richfaces.realworld.domain.Image;
-import org.richfaces.realworld.domain.User;
-import org.richfaces.realworld.navigation.NavigationEnum;
import org.richfaces.realworld.service.Constants;
@Name("renderLogic2")
@Scope(ScopeType.CONVERSATION)
public class RenderLogic2 implements Serializable{
- @In User user;
@In Identity identity;
@In ConversationState conversationState;
private static final long serialVersionUID = 5656562187249324512L;
- public boolean shouldRenderFriendFolders(){
+ /*public boolean shouldRenderFriendFolders(){
return conversationState.getSelectedUser() == null;
}
public boolean shouldRenderFolders(){
return conversationState.getSelectedUser()!=null &&
conversationState.getSelectedImage() == null;
- }
+ }*/
public boolean shouldRenderImage(){
return conversationState.getSelectedAlbum()!=null &&
conversationState.getSelectedImage() != null;
@@ -60,43 +55,43 @@
return conversationState.getSelectedAlbum()!=null &&
conversationState.getSelectedImage() == null;
}
- public boolean isCurrentUserProfileSelected(){
+ /*public boolean isCurrentUserProfileSelected(){
return user.equals(conversationState.getSelectedUser());
}
public boolean isSecondUserProfileSelected(){
return conversationState.getSecondSelectedUser() != null;
- }
+ }*/
- public boolean isUserAlbumSelected(){
+/* public boolean isUserAlbumSelected(){
return conversationState.getSelectedAlbum() != null &&
conversationState.getSelectedAlbum().getOwner().equals(user);
- }
+ }*/
public boolean isUserGuest(){
return !identity.hasRole(Constants.ADMIN_ROLE);
}
- public boolean isOwner(User u){
+/* public boolean isOwner(User u){
return user.equals(u);
- }
+ }*/
- public boolean isProfileSelected(){
+/* public boolean isProfileSelected(){
return conversationState.getMainArea() == NavigationEnum.USER_PREFS;
- }
+ }*/
- public boolean shouldRenderFileUpload(){
+/* public boolean shouldRenderFileUpload(){
return conversationState.getSelectedAlbum()!=null &&
conversationState.getSelectedAlbum().getOwner().equals(user);
- }
+ }*/
- public boolean isUserSelected(){
+ /*public boolean isUserSelected(){
return user.equals(conversationState.getSelectedUser());
}
public boolean isFriendSelected(){
return conversationState.getSelectedUser() == null || isUserFriend();
- }
+ }*/
- public boolean isNotFriendSelected(){
+ /*public boolean isNotFriendSelected(){
return !isUserSelected() && !isUserFriend();
}
@@ -106,7 +101,7 @@
public boolean isUserFriend(User u){
return user.getFriends() != null && user.getFriends().contains(u);
- }
+ }*/
public boolean isAlbumSelected(){
return conversationState.getSelectedAlbum() != null;
@@ -116,11 +111,11 @@
return conversationState.getSelectedImage() != null;
}
- public boolean isAccessToAlbumGranted(Album album){
+ /*public boolean isAccessToAlbumGranted(Album album){
return album.getOwner().equals(user) || album.isShared() ||
isUserFriend(album.getOwner());
- }
+ }*/
- public boolean isUserAlbum(Album album){
+/* public boolean isUserAlbum(Album album){
if(album == null){
return false;
}
@@ -133,6 +128,6 @@
public boolean isFavoriteImage(Image image){
return user.getFavoriteImages().contains(image);
- }
+ }*/
}
Modified: trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
---
trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/faces-config.xml 2009-02-03
15:36:56 UTC (rev 12549)
+++
trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/faces-config.xml 2009-02-03
16:00:20 UTC (rev 12550)
@@ -8,7 +8,6 @@
<locale-config>
<default-locale>en</default-locale>
<supported-locale>en</supported-locale>
- <supported-locale>ru</supported-locale>
</locale-config>
<view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
</application>
Modified:
trunk/test-applications/realworld/web/src/main/webapp/includes/image/imagePreview.xhtml
===================================================================
(Binary files differ)
Modified:
trunk/test-applications/realworld/web/src/main/webapp/includes/image/scroller.xhtml
===================================================================
(Binary files differ)
Modified:
trunk/test-applications/realworld/web/src/main/webapp/includes/imagePreview.xhtml
===================================================================
(Binary files differ)