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