001/* 002 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 003 * 004 * Copyright (c) 2005 Sun Microsystems Inc. All Rights Reserved 005 * 006 * The contents of this file are subject to the terms 007 * of the Common Development and Distribution License 008 * (the License). You may not use this file except in 009 * compliance with the License. 010 * 011 * You can obtain a copy of the License at 012 * https://opensso.dev.java.net/public/CDDLv1.0.html or 013 * opensso/legal/CDDLv1.0.txt 014 * See the License for the specific language governing 015 * permission and limitations under the License. 016 * 017 * When distributing Covered Code, include this CDDL 018 * Header Notice in each file and include the License file 019 * at opensso/legal/CDDLv1.0.txt. 020 * If applicable, add the following below the CDDL Header, 021 * with the fields enclosed by brackets [] replaced by 022 * your own identifying information: 023 * "Portions Copyrighted [year] [name of copyright owner]" 024 * 025 * $Id: ServiceListener.java,v 1.5 2009/01/28 05:35:03 ww203982 Exp $ 026 * 027 * Portions Copyrighted 2015 ForgeRock AS. 028 */ 029 030package com.sun.identity.sm; 031 032import org.forgerock.openam.ldap.PersistentSearchChangeType; 033 034/** 035 * The interface <code>ServiceListener</code> needs to be implemented by 036 * applications in order to receive service data change notifications. The 037 * method <code>schemaChanged()</code> is invoked when a service schema data 038 * has been changed. The method <code>globalConfigChanged()</code> and 039 * <code>organizationConfigChanged()</code> are invoked when the service 040 * configuration data has been changed. 041 * 042 * @supported.all.api 043 */ 044public interface ServiceListener { 045 046 /** 047 * The change type specifies that the entry has been added. 048 */ 049 int ADDED = PersistentSearchChangeType.ADDED; 050 051 /** 052 * The change type specifies that the entry has been removed. 053 */ 054 int REMOVED = PersistentSearchChangeType.REMOVED; 055 056 /** 057 * The change type specifies that the entry has been modified. 058 */ 059 int MODIFIED = PersistentSearchChangeType.MODIFIED; 060 061 /** 062 * This method will be invoked when a service's schema has been changed. 063 * 064 * @param serviceName 065 * name of the service 066 * @param version 067 * version of the service 068 */ 069 public void schemaChanged(String serviceName, String version); 070 071 /** 072 * This method will be invoked when a service's global configuration data 073 * has been changed. The parameter <code>groupName</code> denote the name 074 * of the configuration grouping (e.g. default) and 075 * <code>serviceComponent</code> denotes the service's sub-component that 076 * changed (e.g. <code>/NamedPolicy</code>, <code>/Templates</code>). 077 * 078 * @param serviceName 079 * name of the service. 080 * @param version 081 * version of the service. 082 * @param groupName 083 * name of the configuration grouping. 084 * @param serviceComponent 085 * name of the service components that changed. 086 * @param type 087 * change type, i.e., ADDED, REMOVED or MODIFIED. 088 */ 089 public void globalConfigChanged(String serviceName, String version, 090 String groupName, String serviceComponent, int type); 091 092 /** 093 * This method will be invoked when a service's organization configuration 094 * data has been changed. The parameters <code>orgName</code>, 095 * <code>groupName</code> and <code>serviceComponent</code> denotes the 096 * organization name, configuration grouping name and service's 097 * sub-component that are changed respectively. 098 * 099 * @param serviceName 100 * name of the service 101 * @param version 102 * version of the service 103 * @param orgName 104 * organization name as DN 105 * @param groupName 106 * name of the configuration grouping 107 * @param serviceComponent 108 * the name of the service components that changed 109 * @param type 110 * change type, i.e., ADDED, REMOVED or MODIFIED 111 */ 112 public void organizationConfigChanged(String serviceName, String version, 113 String orgName, String groupName, String serviceComponent, 114 int type); 115}