public class DefaultClientTypesManager extends Object implements ClientTypesManager, AMClientDataListener
Modifier and Type | Field and Description |
---|---|
protected static String |
CDM_SERVICE_NAME |
Constructor and Description |
---|
DefaultClientTypesManager() |
Modifier and Type | Method and Description |
---|---|
Client |
addClient(SSOToken token,
String clientType,
Map cMap,
boolean store)
Add the new client to internal DB, if store == true, else keep it only in
memory.
|
int |
addClientExternal(SSOToken token,
Map props)
Wrapper methods for add/modify/remove APIs in AMClientCapData.
|
protected Client |
addToClientMap(String ct,
Map cMap)
Add to the userAgentMap, clientTypeMap & ProfilesMap.
|
protected Client |
addToClientMap(String ct,
Map cMap,
boolean addToStyles) |
protected Client |
addToIndexes(String ct,
Map cMap)
Create Client Object & add to all our indexes.
|
protected Client |
addToIndexes(String ct,
Map cMap,
boolean addtoStyles) |
void |
addToPartialMatchMap(String ua,
String clientType)
Add client to our partialMatchMap.
|
boolean |
canCreateClients()
Check if we can create clients and add them to internal DB.
|
void |
clientChanged(String clientType,
int dbType,
int opType)
AMClientDataListener method for client change notification
|
Map |
getAllClientInstances()
Gets all client instance as Map.
|
Set |
getAllClientTypes()
Get names of all client types
|
Set |
getBaseProfileNames() |
Client |
getClientInstance(String clientType)
Get the clientType from clientTypeMap.
|
Client |
getClientInstance(String clientType,
SSOToken token)
Gets client object for specified client type with specified token
|
Map |
getClients(String baseProfileName,
String style) |
Map |
getClientTypeData(String clientType)
Returns properties of the requested client type
|
String |
getDefaultClientType()
Get default client type name
|
Client |
getFromUserAgentMap(String ua) |
String |
getPartiallyMatchedClient(String ua)
Get a previously "partially" matched userAgent String
|
Set |
getStyles(String baseProfileName) |
protected Map |
getStylesProfileMap(String ct,
Set p)
Get the Style Map corresponding to the parentSet p.
|
void |
initManager()
Do stuff that needs to get the Manager working.
|
protected Client |
loadClient(String clientType)
1.
|
protected Map |
loadExternalClient(String clientType)
Load client properties recursively from external DB
|
protected Map |
loadInternalClient(String clientType)
Load client properties recursively from internal DB
|
protected void |
loadMaps()
Refactor method Load the userAgentMap.
|
int |
modifyClientExternal(SSOToken token,
Map props) |
int |
removeClientExternal(SSOToken token,
String clientType) |
protected void |
removeFromClientMap(String ct,
Client c)
complements addToClientMap()
|
protected void |
removeFromMaps(String clientType)
Remove all references to this client
|
protected void |
removeFromProfilesMap(String ct,
Client c)
complements storeInProfilesMap
|
void |
setDirty(String ct,
Map data)
Updates client data.
|
protected void |
setParentStyles(Map clientData)
Sets the styles and parent ids tree set for a client
|
void |
store(SSOToken token)
Save changed to persistent store.
|
protected void |
storeInProfilesMap(Client client)
Adds the client to its appropriate baseProfileMap & styleMap.
|
void |
updateClientData()
Reload all Client data.
|
Set |
userAgentSet() |
protected static final String CDM_SERVICE_NAME
public void initManager()
initManager
in interface ClientTypesManager
protected void loadMaps()
protected Client addToClientMap(String ct, Map cMap)
protected Client addToClientMap(String ct, Map cMap, boolean addToStyles)
addToStyles
- Indicates if the Client should be added to the Styles Map.
Will be false when a Client is added from CC/PP module, whose
added clients shouldn't be visible in the admin console.protected void removeFromClientMap(String ct, Client c)
protected void storeInProfilesMap(Client client)
protected void removeFromProfilesMap(String ct, Client c)
protected Map getStylesProfileMap(String ct, Set p)
protected Client addToIndexes(String ct, Map cMap)
protected Client addToIndexes(String ct, Map cMap, boolean addtoStyles)
addtoStyles
- true only if the data is stored in ldap false for uaprof
clients which only stay in memory.public Set userAgentSet()
public String getPartiallyMatchedClient(String ua)
public void addToPartialMatchMap(String ua, String clientType)
public Client addClient(SSOToken token, String clientType, Map cMap, boolean store) throws AMClientCapException
AMClientCapException
public boolean canCreateClients()
public Map getAllClientInstances()
ClientTypesManager
getAllClientInstances
in interface ClientTypesManager
public Set getAllClientTypes()
ClientTypesManager
getAllClientTypes
in interface ClientTypesManager
public Client getClientInstance(String clientType)
getClientInstance
in interface ClientTypesManager
clientType
- requested client type.public Client getClientInstance(String clientType, SSOToken token)
ClientTypesManager
getClientInstance
in interface ClientTypesManager
clientType
- requested client typetoken
- SSO Tokenpublic Map getClientTypeData(String clientType)
ClientTypesManager
getClientTypeData
in interface ClientTypesManager
clientType
- requested client typeprotected Client loadClient(String clientType)
protected Map loadInternalClient(String clientType)
protected Map loadExternalClient(String clientType)
public String getDefaultClientType()
getDefaultClientType
in interface ClientTypesManager
public void updateClientData() throws ClientException
ClientTypesManager
updateClientData
in interface ClientTypesManager
ClientException
- if having problem update client datapublic void store(SSOToken token) throws SMSException, SSOException
ClientTypesManager
store
in interface ClientTypesManager
token
- single sign on Token of the caller.SMSException
- if having problem saving changes.SSOException
- if the token is not valid.public void setDirty(String ct, Map data)
ClientTypesManager
store()
after this
method.setDirty
in interface ClientTypesManager
ct
- client typedata
- client data. Key is the property name and value is the
property value as String.public void clientChanged(String clientType, int dbType, int opType)
clientChanged
in interface AMClientDataListener
clientType
- dbType
- opType
- public Set getBaseProfileNames()
public Set getStyles(String baseProfileName)
baseProfileName
- A valid base profile namepublic Map getClients(String baseProfileName, String style)
baseProfileName
- A valid base profile namestyle
- A valid style namepublic int addClientExternal(SSOToken token, Map props) throws AMClientCapException
AMClientCapException
public int modifyClientExternal(SSOToken token, Map props) throws AMClientCapException
token
- props
- AMClientCapException
public int removeClientExternal(SSOToken token, String clientType) throws AMClientCapException
token
- clientType
- AMClientCapException
protected void removeFromMaps(String clientType)
clientType
- The removable clientTypeprotected void setParentStyles(Map clientData)
clientData
- Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.