001/*
002 *  Copyright 2013 Anyware Services
003 *
004 *  Licensed under the Apache License, Version 2.0 (the "License");
005 *  you may not use this file except in compliance with the License.
006 *  You may obtain a copy of the License at
007 *
008 *      http://www.apache.org/licenses/LICENSE-2.0
009 *
010 *  Unless required by applicable law or agreed to in writing, software
011 *  distributed under the License is distributed on an "AS IS" BASIS,
012 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 *  See the License for the specific language governing permissions and
014 *  limitations under the License.
015 */
016package org.ametys.plugins.explorer;
017
018/**
019 * Constants for observers.
020 */
021public interface ObservationConstants
022{
023    // ------------------------- //
024    // Resources and collections //
025    // ------------------------- //
026    
027    /** Event id when a resource is created. */
028    public static final String EVENT_RESOURCE_CREATED = "resource.created";
029    
030    /** Event id when a resource is modified. */
031    public static final String EVENT_RESOURCE_UPDATED = "resource.updated";
032    
033    /** Event id when a resource is renamed. */
034    public static final String EVENT_RESOURCE_RENAMED = "resource.renamed";
035    
036    /** Event id when a resource is deleted. */
037    public static final String EVENT_RESOURCE_DELETED = "resource.deleted";
038    
039    /** Event id when a resource is commented. */
040    public static final String EVENT_RESOURCE_COMMENTED = "resource.commented";
041    
042    /** Event id when a resource is moved. */
043    public static final String EVENT_RESOURCE_MOVED = "resource.moved";
044    
045    /** Event id when a collection is created. */
046    public static final String EVENT_COLLECTION_CREATED = "collection.created";
047    
048    /** Event id when a collection is renamed. */
049    public static final String EVENT_COLLECTION_RENAMED = "collection.renamed";
050    
051    /** Event id when a collection is deleted. */
052    public static final String EVENT_COLLECTION_DELETED = "collection.deleted";
053    
054    /** Event id when a collection is moved. */
055    public static final String EVENT_COLLECTION_MOVED = "collection.moved";
056    
057    /** Event id when a collection is copied. */
058    public static final String EVENT_COLLECTION_COPIED = "collection.copied";
059    
060    /** Event id when a CMIS collection is updated. */
061    public static final String EVENT_CMIS_COLLECTION_UPDATED = "cmis.collection.updated";
062    
063    
064    // ------------------//
065    // Threads and posts //
066    // ------------------//
067    
068    /** Event id when a thread is created. */
069    public static final String EVENT_THREAD_CREATED = "thread.created";
070    
071    /** Event id when a thread is modified. */
072    public static final String EVENT_THREAD_UPDATED = "thread.updated";
073    
074    /** Event id when a thread is renamed. */
075    public static final String EVENT_THREAD_RENAMED = "thread.renamed";
076    
077    /** Event id when a thread is moved. */
078    public static final String EVENT_THREAD_MOVED = "thread.moved";
079    
080    /** Event id when a thread is deleted. */
081    public static final String EVENT_THREAD_DELETED = "thread.deleted";
082    
083    /** Event id when a post is created. */
084    public static final String EVENT_THREAD_POST_CREATED = "thread.post.created";
085    
086    /** Event id when a post is modified */
087    public static final String EVENT_THREAD_POST_UPDATED = "thread.post.updated";
088    
089    /** Event id when a post id deleted */
090    public static final String EVENT_THREAD_POST_DELETED = "thread.post.deleted";
091    
092    
093    // ----------------------------//
094    // Calendar and calendar events//
095    // ----------------------------//
096    
097    /** Event id when a calendar is created. */
098    public static final String EVENT_CALENDAR_CREATED = "calendar.created";
099    
100    /** Event id when a calendar is updated. */
101    public static final String EVENT_CALENDAR_UPDATED = "calendar.updated";
102    
103    /** Event id when a calendar is deleted. */
104    public static final String EVENT_CALENDAR_DELETED = "calendar.deleted";
105    
106    /** Event id when a calendar is moved. */
107    public static final String EVENT_CALENDAR_MOVED = "calendar.moved";
108    
109    /** Event id when a calendar event is created. */
110    public static final String EVENT_CALENDAR_EVENT_CREATED = "calendar.event.created";
111    
112    /** Event id when a calendar event is updated. */
113    public static final String EVENT_CALENDAR_EVENT_UPDATED = "calendar.event.updated";
114    
115    /** Event id when a calendar event is deleted. */
116    public static final String EVENT_CALENDAR_EVENT_DELETED = "calendar.event.deleted";
117    
118    
119    // ------------//
120    // Tasks lists //
121    // ----------- //
122    
123    /** Event id when a task is created. */
124    public static final String EVENT_TASK_CREATED = "task.created";
125    
126    /** Event id when a task is assigned to (a) user(s). */
127    public static final String EVENT_TASK_ASSIGNED = "task.assigned";
128    
129    /** Event id when a task's status is changed. */
130    public static final String EVENT_TASK_STATUS_CHANGED = "task.status.changed";
131    
132    /** Event id when a task is modified. */
133    public static final String EVENT_TASK_UPDATED = "task.updated";
134    
135    /** Event id when a task is deleted. */
136    public static final String EVENT_TASK_DELETING = "task.deleting";
137    
138    /** Event id when a task is deleted. */
139    public static final String EVENT_TASK_DELETED = "task.deleted";
140    
141    
142    // ----------------//
143    // Event arguments //
144    // ----------------//
145    
146    /** Argument name for processed task */
147    public static final String ARGS_TASK = "task";
148    
149    /** Argument name for processed calendar */
150    public static final String ARGS_CALENDAR = "calendar";
151    
152    /** Argument name for processed calendar's event */
153    public static final String ARGS_CALENDAR_EVENT = "calendar.event";
154    
155    /** Argument name for processed calendar */
156    public static final String ARGS_THREAD = "thread";
157    
158    /** Argument name for processed calendar */
159    public static final String ARGS_POST = "post";
160    
161    /** Argument name for processed object's id */
162    public static final String ARGS_ID = "object.id";
163    
164    /** Argument name for processed object's name */
165    public static final String ARGS_NAME = "object.name";
166    
167    /** Argument name for processed object's path */
168    public static final String ARGS_PATH = "object.path";
169    
170    /** Argument name for processed object's parent id */
171    public static final String ARGS_PARENT_ID = "object.parent";
172    
173    /** Argument name for processed object's parent path */
174    public static final String ARGS_PARENT_PATH = "object.parent.path";
175    
176    /** Argument name for processed resources */
177    public static final String ARGS_RESOURCES = "resources";
178    
179    /** Argument name for processed resource path */
180    public static final String ARGS_RESOURCE_PATH = "resource.path";
181    
182    /** Argument name for processed explorer path */
183    public static final String ARGS_EXPLORER_PATH = "explorer.path";
184}