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: ClientTypesManager.java,v 1.3 2008/06/25 05:41:32 qcheng Exp $
026 *
027 */
028
029package com.iplanet.services.cdm;
030
031import java.util.Map;
032import java.util.Set;
033
034import com.iplanet.sso.SSOException;
035import com.iplanet.sso.SSOToken;
036import com.sun.identity.sm.SMSException;
037
038/**
039 * Interface that needs to be implemented by external applications inorder to do
040 * some special processing for client management. The implementation module is
041 * pluggable and is configurable via <code>AMConfig.properties</code>. The
042 * property to set is <code>com.iplanet.ClientTypesManagerImpl</code>.
043 * @supported.all.api
044 */
045public interface ClientTypesManager {
046
047    /**
048     * Initializes the <code>ClientTypesManager</code>.
049     */
050    public void initManager();
051
052    /**
053     * Gets all client instance as Map.
054     * 
055     * @return Map of clients. Key is the client type, value is the Client
056     *         object
057     */
058    public Map getAllClientInstances();
059
060    /**
061     * Gets client object for specified client type.
062     * 
063     * @param clientType
064     *            requested client type.
065     * @return The requested Client object
066     */
067    public Client getClientInstance(String clientType);
068
069    /**
070     * Gets client object for specified client type with specified token
071     * 
072     * @param clientType
073     *            requested client type
074     * @param token
075     *            SSO Token
076     * @return The requested Client object
077     */
078    public Client getClientInstance(String clientType, SSOToken token);
079
080    /**
081     * Returns properties of the requested client type
082     * 
083     * @param clientType
084     *            requested client type
085     * @return All properties of the request client type as Map
086     */
087    public Map getClientTypeData(String clientType);
088
089    /**
090     * Gets default client type name
091     * 
092     * @return The default client type name
093     */
094    public String getDefaultClientType();
095
096    /**
097     * Get names of all client types
098     * 
099     * @return Set of client types as String
100     */
101    public Set getAllClientTypes();
102
103    /**
104     * Reload all Client data.
105     * 
106     * @throws ClientException
107     *             if having problem update client data
108     */
109    public void updateClientData() throws ClientException;
110
111    /**
112     * Save changed to persistent store.
113     * 
114     * @param token
115     *            single sign on Token of the caller.
116     * @throws SSOException
117     *             if the token is not valid.
118     * @throws SMSException
119     *             if having problem saving changes.
120     */
121    public void store(SSOToken token) throws SMSException, SSOException;
122
123    /**
124     * Updates client data. Need to call <code>store()</code> after this
125     * method.
126     * 
127     * @param clientType
128     *            client type
129     * @param data
130     *            client data. Key is the property name and value is the
131     *            property value as String.
132     */
133    public void setDirty(String clientType, Map data);
134}




























































Copyright © 2010-2017, ForgeRock All Rights Reserved.