001/*
002 *  Copyright 2016 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.core;
017
018/**
019 * Interface for observers
020 *
021 */
022public interface ObservationConstants
023{
024    /** Event id when a profile is delete. */
025    public static final String EVENT_PROFILE_ADDED = "profile.added";
026    
027    /** Event id when a profile is delete. */
028    public static final String EVENT_PROFILE_UPDATED = "profile.updated";
029    
030    /** Event id when a profile is delete. */
031    public static final String EVENT_PROFILE_DELETED = "profile.deleted";
032    
033    /** Event id when a user is added. */
034    public static final String EVENT_USER_ADDED = "user.added";
035    
036    /** Event id when a user is updated. */
037    public static final String EVENT_USER_UPDATED = "user.updated";
038    
039    /** Event id when a user is deleted. */
040    public static final String EVENT_USER_DELETED = "user.deleted";
041    
042    /** Event id when a user authenticates. */
043    public static final String EVENT_USER_AUTHENTICATED = "user.loggedin";
044    
045    /** Event id when a group is added. */
046    public static final String EVENT_GROUP_ADDED = "group.added";
047    
048    /** Event id when a group is updated. */
049    public static final String EVENT_GROUP_UPDATED = "group.updated";
050    
051    /** Event id when a group is deleted. */
052    public static final String EVENT_GROUP_DELETED = "group.deleted";
053    
054    /** Event id when ACL is updated. */
055    public static final String EVENT_ACL_UPDATED = "acl.update";
056    
057    /** Event id when a datasource is added. */
058    public static final String EVENT_DATASOURCE_ADDED = "datasource.added";
059    
060    /** Event id when a datasource is updated. */
061    public static final String EVENT_DATASOURCE_UPDATED = "datasource.updated";
062    
063    /** Event id when a datasource is deleted. */
064    public static final String EVENT_DATASOURCE_DELETED = "datasource.deleted";
065
066    /** Event id when a userpopulation is added. */
067    public static final String EVENT_USERPOPULATION_ADDED = "userpopulation.added";
068    
069    /** Event id when a userpopulation is updated. */
070    public static final String EVENT_USERPOPULATION_UPDATED = "userpopulation.updated";
071    
072    /** Event id when a userpopulation is deleted. */
073    public static final String EVENT_USERPOPULATION_DELETED = "userpopulation.deleted";
074
075    /** Event id when a userpopulation is assigned. */
076    public static final String EVENT_USERPOPULATIONS_ASSIGNMENT = "userpopulations.assignment";
077
078    /** Argument name for processed profile */
079    public static final String ARGS_PROFILE = "profile";
080    
081    /** Argument name for processed user */
082    public static final String ARGS_USER = "user";
083    
084    /** Argument name for processed group */
085    public static final String ARGS_GROUP = "group";
086    
087    /** Argument name for processed acl context */
088    public static final String ARGS_ACL_CONTEXT = "acl-context";
089    
090    /** Argument name for processed acl context identifier */
091    public static final String ARGS_ACL_CONTEXT_IDENTIFIER = "acl-context-identifier";
092    
093    /** Argument name for the updated ACL profiles */
094    public static final String ARGS_ACL_PROFILES = "acl-profiles";
095    
096    /** Argument name (optional, default=false) for the acl.update event for indicating if this update has no influence on Solr ACL cache */
097    public static final String ARGS_ACL_SOLR_CACHE_UNINFLUENTIAL = "acl-solr-cache-uninfluential";
098    
099    /** Argument name for processed datasources (a list of id) */
100    public static final String ARGS_DATASOURCE_IDS = "datasource-ids";
101
102    /** Argument name for processed userpopulation (an id) */
103    public static final String ARGS_USERPOPULATION_ID = "userpopulation-id";
104
105    /** Argument name for processed userpopulations (a list of id) */
106    public static final String ARGS_USERPOPULATION_IDS = "userpopulation-ids";
107
108    /** Argument name for processed userpopulations context */
109    public static final String ARGS_USERPOPULATION_CONTEXT = "userpopulation-context";
110}