8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster/**
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster *
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Copyright (c) 2005 Sun Microsystems Inc. All Rights Reserved
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster *
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * The contents of this file are subject to the terms
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * of the Common Development and Distribution License
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * (the License). You may not use this file except in
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * compliance with the License.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster *
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * You can obtain a copy of the License at
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * https://opensso.dev.java.net/public/CDDLv1.0.html or
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * opensso/legal/CDDLv1.0.txt
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * See the License for the specific language governing
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * permission and limitations under the License.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster *
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * When distributing Covered Code, include this CDDL
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Header Notice in each file and include the License file
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * at opensso/legal/CDDLv1.0.txt.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * If applicable, add the following below the CDDL Header,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * with the fields enclosed by brackets [] replaced by
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * your own identifying information:
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * "Portions Copyrighted [year] [name of copyright owner]"
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster *
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * $Id: AMObjectListener.java,v 1.3 2008/06/25 05:41:21 qcheng Exp $
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster *
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster */
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterpackage com.iplanet.am.sdk;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterimport java.util.EventListener;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterimport java.util.Map;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterimport java.util.Set;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster/**
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * The purpose of this interface is to allow AM SDK plugin implementors to
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * return changes about AM Entities
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster *
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @deprecated As of Sun Java System Access Manager 7.1.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster */
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterpublic interface AMObjectListener extends EventListener {
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster /**
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * This callback method is called by the Identity Repository plugin when
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * backend datastore triggers a notification event
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster *
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param name
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * unique name of the object that has changed
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param type
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * type of change i.e., ADD, DELETE, MODIFY
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param configMap
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Map of configuration information which the AM SDK framework
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * passes to the plugin, and which the plugin should return as
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * is. This information helps the framework to map the object to
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * the universal identifier used as the cache key.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster */
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster public void objectChanged(String name, int type, Map configMap);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster /**
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * This callback method is called by the Identity Repository plugin when
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * backend datastore triggers a notification event that results in multiple
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * objects being modified. This callback signifies a change to specific
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * attributes of all members of the organization. This callback should be
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * used to notify modifications of "dynamic" or "virtual" attributes.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster *
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param parentNames
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * name of the parent whoes "dynamic" attributes attributes have
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * been modified, affecting all its children
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param type
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * type of change i.e., ADD, DELETE, MODIFY
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param attrNames
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * attribute names that have been modified
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param configMap
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Map of configuration information which the AM SDK framework
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * passes to the plugin, and which the plugin should return as
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * is. This information helps the framework to map the object to
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * the universal identifier used as the cache key.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster */
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster public void objectsChanged(String parentNames, int type, Set attrNames,
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster Map configMap);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster /**
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * This callback method is called by the Identity Repository plugin when
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * backend datastore triggers a permission change notification event. This
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * callback signifies a change in the permissions associated with an
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * organization. A change in the permission can impack the permissios of all
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * entities in an organization and all cached entries for that organization
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * will be cleared.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster *
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param orgName
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * unique name of the organization whoes permissions has changed
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * @param configMap
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Map of configuration information which the AM SDK framework
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * passes to the plugin, and which the plugin should return as
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * is. This information helps the framework to map the object to
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * the universal identifier used as the cache key.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster */
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster public void permissionsChanged(String orgName, Map configMap);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster /**
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * This callback notifies the listener that all object should be marked as
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * "changed" or "dirty". This callback is only used in the case when IdRepo
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * plugin looses the connection to data store and does not know what could
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * have changed in the repository.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster */
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster public void allObjectsChanged();
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster public void setConfigMap(Map cmap);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster public Map getConfigMap();
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster public static final int ADD = AMEvent.OBJECT_ADDED;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster public static final int DELETE = AMEvent.OBJECT_REMOVED;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster public static final int MODIFY = AMEvent.OBJECT_CHANGED;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster public static final int RENAMED = AMEvent.OBJECT_CHANGED;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster}