PageRenderTime 264ms CodeModel.GetById 120ms app.highlight 6ms RepoModel.GetById 135ms app.codeStats 0ms

/src/main/java/com/google/ie/business/service/ServiceConstants.java

http://thoughtsite.googlecode.com/
Java | 74 lines | 45 code | 5 blank | 24 comment | 0 complexity | 9a5ca1854facd8fca318fb076a5caf60 MD5 | raw file
 1/* Copyright 2010 Google Inc.
 2 * 
 3 * Licensed under the Apache License, Version 2.0 (the "License");
 4 * you may not use this file except in compliance with the License.
 5 * You may obtain a copy of the License at
 6 * 
 7 *      http://www.apache.org/licenses/LICENSE-2.0
 8 * 
 9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS.
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License
14 */
15
16package com.google.ie.business.service;
17
18/**
19 * An interface for service layer constants.
20 * 
21 */
22public interface ServiceConstants {
23    int ZERO = 0;
24    int ONE = 1;
25    int MINUSONE = -1;
26    int HUNDRED = 100;
27    int FIFTY = 50;
28    String AUDIT_ACTION_TYPE_SAVE_IDEA = "SAVE_IDEA";
29    String AUDIT_ACTION_TYPE_PUBLISH_IDEA = "PUBLISH_IDEA";
30    String AUDIT_ACTION_TYPE_SAVE_COMMENT = "SAVE_COMMENT";
31    String AUDIT_ACTION_TYPE_CREATE_PROJECT = "CREATE_PROJECT";
32    /* Default parameters for a fetch query on tags */
33    String DEFAULT_ORDER_BY_FIELD_FOR_TAG = "title";
34    String DEFAULT_ORDER_TYPE_FOR_TAG = "asc";
35    long DEFAULT_START_INDEX_FOR_TAG = 0;
36    // Default value for list of tags starting with a specific string.
37    long DEFAULT_NO_OF_RECORDS_FOR_TAG_LIST = 1000;
38    // Default value for auto suggestion for tags and tag cloud.
39    long DEFAULT_NO_OF_RECORDS_FOR_TAG = 50;
40
41    String SAVE = "save";
42    String ORDERING_ASCENDING = "asc";
43    String ORDERING_DESCENDING = "desc";
44    // Idea listing constants.
45    int USER_IDEAS_LIST_DEFAULT_SIZE = 10;
46    int IDEAS_LIST_DEFAULT_SIZE = 10;
47    int USERS_LIST_DEFAULT_SIZE = 20;
48    String DEFAULT_USER_ORDERING_TYPE = ORDERING_DESCENDING;
49    String DEFAULT_IDEA_ORDERING_TYPE = ORDERING_DESCENDING;
50    String ORDERING_TYPE_FOR_RECENT_IDEAS = ORDERING_DESCENDING;
51
52    String USER_ORDERING_FIELD = "displayName";
53    String IDEA_ORDERING_FIELD_PUBLISH_DATE = "publishDate";
54    String IDEA_ORDERING_FIELD_LAST_UPDATE_DATE = "lastUpdated";
55    String IDEA_ORDERING_FIELD_VOTE = "totalVotes";
56    String IDEA_ORDERING_FIELD_TOTAL_POSITIVE_VOTES = "totalPositiveVotes";
57    String DEFAULT_IDEA_ORDERING_FIELD = IDEA_ORDERING_FIELD_PUBLISH_DATE;
58    String IDEA_ORDERING_FIELD_CREATED_ON = "";
59    // Project listing constant.
60    int PROJECT_LIST_DEFAULT_SIZE = 10;
61    String PROJECT_DEFAULT_ORDERING_TYPE = ORDERING_DESCENDING;
62    String PROJECT_ORDERING_FIELD_UPDATED_ON = "updatedOn";
63    String DEFAULT_PROJECT_ORDERING_FIELD = PROJECT_ORDERING_FIELD_UPDATED_ON;
64    // Idea comment listing default constants.
65    int IDEA_COMMENT_LIST_DEFAULT_SIZE = 20;
66    String IDEA_COMMENT_ORDERING_FIELD_CREATED_ON = "createdOn";
67    String DEFAULT_IDEA_COMMENT_ORDERING_TYPE = ORDERING_DESCENDING;
68    String DEFAULT_IDEA_COMMENT_ORDERING_FIELD = IDEA_COMMENT_ORDERING_FIELD_CREATED_ON;
69    String ALL = "all";
70    String IDEA = "Idea";
71    String PROJECT = "Project";
72    String COMMENT = "Comment";
73}
74