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.authentication;
017
018import java.util.Map;
019
020import org.apache.avalon.framework.configuration.Configuration;
021
022import org.ametys.runtime.i18n.I18nizableText;
023import org.ametys.runtime.parameter.Parameter;
024import org.ametys.runtime.parameter.ParameterCheckerDescriptor;
025import org.ametys.runtime.parameter.ParameterHelper.ParameterType;
026
027/**
028 * This class representes a model for a {@link CredentialProvider}
029 */
030public interface CredentialProviderModel
031{
032    /**
033     * Get the id of this credential provider
034     * @return the id of this credential provider
035     */
036    public String getId();
037    
038    /**
039     * Get the label of the credential provider.
040     * @return the label of the credential provider
041     */
042    public I18nizableText getLabel();
043    
044    /**
045     * Get the description text of the credential provider.
046     * @return the description of the credential provider
047     */
048    public I18nizableText getDescription();
049    
050    /**
051     * Get the label for the connection screen of the credential provider
052     * @return the label for the connection screen of the credential provider
053     */
054    public I18nizableText getConnectionLabel();
055    
056    /**
057     * Get the CSS class for the glyph icon
058     * @return the CSS class for the glyph icon
059     */
060    public String getIconGlyph();
061    
062    /**
063     * Get the CSS class for the glyph decorator icon
064     * @return the CSS class for the glyph decorator icon
065     */
066    public String getIconDecorator();
067    
068    /**
069     * Get the path of the small icon resource
070     * @return the path of the small icon resource
071     */
072    public String getIconSmall();
073    
074    /**
075     * Get the path of the small icon resource
076     * @return the path of the small icon resource
077     */
078    public String getIconMedium();
079    
080    /**
081     * Get the path of the small icon resource
082     * @return the path of the small icon resource
083     */
084    public String getIconLarge();
085    
086    /**
087     * Get the color of the credential provider
088     * @return the color of the credential provider
089     */
090    public String getColor();
091    
092    /**
093     * Get the configuration parameters
094     * @return The configuration parameters
095     */
096    public Map<String, ? extends Parameter<ParameterType>> getParameters();
097    
098    /**
099     * Get the configuration parameter checkers
100     * @return The configuration parameter checkers
101     */
102    public Map<String, ? extends ParameterCheckerDescriptor> getParameterCheckers();
103    
104    /**
105     * Returns the plugin name of declaration (for debug purpose)
106     * @return the plugin name
107     */
108    public String getPluginName();
109    
110    /**
111     * Get the credential provider class
112     * @return the credential provider class
113     */
114    public Class<CredentialProvider> getCredentialProviderClass();
115    
116    /**
117     * Get the additional configuration for the implementation of {@link CredentialProvider}
118     * @return the additional configuration.
119     */
120    public Configuration getCredentialProviderConfiguration ();
121}