View Javadoc
1   /*
2    * Copyright (C) 2003-2007 eXo Platform SAS.
3    *
4    * This program is free software; you can redistribute it and/or
5    * modify it under the terms of the GNU Affero General Public License
6    * as published by the Free Software Foundation; either version 3
7    * of the License, or (at your option) any later version.
8    *
9    * This program is distributed in the hope that it will be useful,
10   * but WITHOUT ANY WARRANTY; without even the implied warranty of
11   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12   * GNU General Public License for more details.
13   *
14   * You should have received a copy of the GNU General Public License
15   * along with this program; if not, see<http://www.gnu.org/licenses/>.
16   */
17  package org.exoplatform.ecm.jcr.model;
18  
19  
20  public class Preference {
21  
22    public static final String SORT_BY_NODENAME = "Alphabetic" ;
23    public static final String SORT_BY_NODETYPE= "Type" ;
24    public static final String SORT_BY_NODESIZE= "Size" ;
25    public static final String SORT_BY_CREATED_DATE= "CreatedDate" ;
26    public static final String SORT_BY_DATE= "Date" ;
27    public static final String SORT_BY_MODIFIED_DATE= "ModifiedDate" ;
28    public static final String PROPERTY_SORT = "Property" ;
29    public static final String SORT_BY_OWNER = "Owner";
30    public static final String SORT_BY_VERSIONABLE = "Versionable";
31    public static final String SORT_BY_AUDITING = "Auditing";
32    public static final String SHOW_OWNED_BY_USER_DOC = "OwnedByMe";
33    public static final String ENABLE_DRAG_AND_DROP = "EnableDragAndDrop";
34    public static final String SHOW_FAVOURITE_DOC = "Favourites";
35    public static final String SHOW_HIDDEN_DOC = "Hidden";
36  
37    public static final String[] SORT_BY_SINGLEVALUE_PROPERTY = {"SingleValueProperty"};
38  
39    public static final String SHOW_NON_DOCUMENTTYPE = "showNonDocumentType" ;
40    public static final String ASCENDING_ORDER = "Ascending" ;
41    public static final String DESCENDING_ORDER = "Descending" ;
42    public static final String SQL_QUERY = "SQL";
43    public static final String XPATH_QUERY = "XPATH";
44  
45    public static final String BLUE_DOWN_ARROW = "Down" ;
46    public static final String BLUE_UP_ARROW = "Up" ;
47    public static final String NODES_PER_PAGE = "nbPerPage";
48    public static final String PREFERENCE_ORDER_BY = "preferenceOrderBy";
49    public static final String PREFERENCE_SORT_BY = "preferenceSortBy";
50    public static final String PREFERENCE_QUERY_TYPE = "preferenceQueryType";
51    public static final String PREFERENCE_ENABLESTRUCTURE = "enableStructure";
52    public static final String PREFERENCE_SHOWSIDEBAR = "showSideBar";
53    public static final String PREFERENCE_SHOWREFDOCUMENTS = "showRefDocuments";
54    public static final String PREFERENCE_SHOW_ITEMS_BY_USER = "showItemsByUserInTimeline";
55    public static final String PREFERENCE_SHOW_HIDDEN_NODE = "isShowHiddenNode";
56  
57    private String sortType = SORT_BY_NODENAME ;
58    private String order = ASCENDING_ORDER ;
59    private String allowCreateFoder = "" ;
60  
61    private boolean jcrEnable = false;
62    private boolean showSideBar = false ;
63    private boolean isShowNonDocumentType = false ;
64    private boolean isShowPreferenceDocuments = false ;
65    private boolean isShowHiddenNode = false ;
66    private boolean isShowOwnedByUserDoc = true;
67    private boolean isEnableDragAndDrop = true;
68    private boolean isShowFavouriteDoc = true;
69    private boolean isShowHiddenDoc = true;
70    private boolean isShowTrashDoc = true;
71    private boolean isShowItemsByUser = true;
72  
73    private String queryType = "SQL";
74    private int nodesPerPage = 20;
75  
76    public boolean isJcrEnable() { return jcrEnable ; }
77    public void setJcrEnable(boolean b) { jcrEnable = b ; }
78  
79    public String getSortType() { return sortType ; }
80    public void setSortType(String s) { sortType = s ; }
81  
82    public String getOrder() { return order ; }
83    public void setOrder(String s) { order = s ; }
84  
85    public boolean isShowSideBar() { return showSideBar ; }
86    public void setShowSideBar(boolean b) { showSideBar = b ; }
87  
88    public boolean isShowNonDocumentType() { return isShowNonDocumentType ; }
89    public void setShowNonDocumentType( boolean b) { isShowNonDocumentType = b ; }
90  
91    public boolean isShowPreferenceDocuments() { return isShowPreferenceDocuments ; }
92    public void setShowPreferenceDocuments(boolean b) { isShowPreferenceDocuments = b ; }
93  
94    public boolean isShowHiddenNode() { return isShowHiddenNode ; }
95    public void setShowHiddenNode(boolean b) { isShowHiddenNode = b ; }
96  
97    public boolean isShowOwnedByUserDoc() { return isShowOwnedByUserDoc; }
98    public void setShowOwnedByUserDoc(boolean b) { isShowOwnedByUserDoc = b; }
99  
100   public boolean isEnableDragAndDrop() { return isEnableDragAndDrop; }
101   public void setEnableDragAndDrop(boolean b) { isEnableDragAndDrop = b; }
102 
103   public boolean isShowFavouriteDoc() { return isShowFavouriteDoc; }
104   public void setShowFavouriteDoc(boolean b) { isShowFavouriteDoc = b; }
105 
106   public boolean isShowHiddenDoc() { return isShowHiddenDoc; }
107   public void setShowHiddenDoc(boolean b) { isShowHiddenDoc = b; }
108 
109   public boolean isShowItemsByUser() { return isShowItemsByUser; }
110   public void setShowItemsByUser(boolean b) { this.isShowItemsByUser = b; }
111 
112   public String getAllowCreateFoder() { return allowCreateFoder ; }
113   public void setAllowCreateFoder(String s) { allowCreateFoder = s ; }
114 
115   public int getNodesPerPage(){return nodesPerPage ; }
116   public void setNodesPerPage(int number) { this.nodesPerPage = number ; }
117 
118   public String getQueryType(){return queryType; }
119   public void setQueryType(String query) { this.queryType = query; }
120 }