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 deleting. */
052    public static final String EVENT_COLLECTION_DELETING = "collection.deleting";
053    
054    /** Event id when a collection is deleted. */
055    public static final String EVENT_COLLECTION_DELETED = "collection.deleted";
056    
057    /** Event id when a collection is moved. */
058    public static final String EVENT_COLLECTION_MOVED = "collection.moved";
059    
060    /** Event id when a collection is copied. */
061    public static final String EVENT_COLLECTION_COPIED = "collection.copied";
062    
063    /** Event id when a CMIS collection is updated. */
064    public static final String EVENT_CMIS_COLLECTION_UPDATED = "cmis.collection.updated";
065    
066    
067    // ------------------//
068    // Threads and posts //
069    // ------------------//
070    
071    /** Event id when a thread is created. */
072    public static final String EVENT_THREAD_CREATED = "thread.created";
073    
074    /** Event id when a thread is modified. */
075    public static final String EVENT_THREAD_UPDATED = "thread.updated";
076    
077    /** Event id when a thread is renamed. */
078    public static final String EVENT_THREAD_RENAMED = "thread.renamed";
079    
080    /** Event id when a thread is moved. */
081    public static final String EVENT_THREAD_MOVED = "thread.moved";
082    
083    /** Event id when a thread is deleted. */
084    public static final String EVENT_THREAD_DELETED = "thread.deleted";
085    
086    /** Event id when a post is created. */
087    public static final String EVENT_THREAD_POST_CREATED = "thread.post.created";
088    
089    /** Event id when a post is modified */
090    public static final String EVENT_THREAD_POST_UPDATED = "thread.post.updated";
091    
092    /** Event id when a post id deleted */
093    public static final String EVENT_THREAD_POST_DELETED = "thread.post.deleted";
094    
095    // ----------------//
096    // Event arguments //
097    // ----------------//
098    
099    /** Argument name for processed thread */
100    public static final String ARGS_THREAD = "thread";
101    
102    /** Argument name for processed thread */
103    public static final String ARGS_POST = "post";
104    
105    /** Argument name for processed object's id */
106    public static final String ARGS_ID = "object.id";
107    
108    /** Argument name for processed object's name */
109    public static final String ARGS_NAME = "object.name";
110    
111    /** Argument name for processed object's path */
112    public static final String ARGS_PATH = "object.path";
113    
114    /** Argument name for processed object's parent id */
115    public static final String ARGS_PARENT_ID = "object.parent";
116    
117    /** Argument name for processed object's parent path */
118    public static final String ARGS_PARENT_PATH = "object.parent.path";
119    
120    /** Argument name for processed resources */
121    public static final String ARGS_RESOURCES = "resources";
122    
123    /** Argument name for processed resource path */
124    public static final String ARGS_RESOURCE_PATH = "resource.path";
125    
126    /** Argument name for processed explorer path */
127    public static final String ARGS_EXPLORER_PATH = "explorer.path";
128}