nl.surfnet.coin.teams.domain
Class GroupProvider

java.lang.Object
  extended by nl.surfnet.coin.teams.domain.GroupProvider
All Implemented Interfaces:
Serializable

public class GroupProvider
extends Object
implements Serializable

Domain object for a Group provider

See Also:
Serialized Form

Constructor Summary
GroupProvider()
           
GroupProvider(Long id, String identifier, String name, GroupProviderType type)
           
GroupProvider(Long id, String identifier, String name, String groupProviderType)
           
 
Method Summary
 void addAllowedOption(String key, Object value)
          Add a configuration option
 void addGroupDecorator(ConversionRule groupIdDecorator)
          Adds a single (outgoing) group id conversion rule
 void addGroupFilter(ConversionRule groupIdFilter)
          Adds single (incoming) group id conversion rule
 void addPersonDecorator(ConversionRule personIdDecorator)
          Adds single (outgoing) person id conversion rule
 void addPersonFilter(ConversionRule personIdFilter)
          Adds single (incoming) person id filter
 void addServiceProviderGroupAcl(ServiceProviderGroupAcl serviceProviderGroupAcl)
           
 boolean equals(Object o)
           
 String getAllowedOptionAsString(String key)
          Convenience method for allowed options
 Map<String,Object> getAllowedOptions()
           
 List<ConversionRule> getGroupDecorators()
          Gets (outgoing) conversion rules to convert an urn:collab:groups:nl.myuniversity:group1 into group1
 List<ConversionRule> getGroupFilters()
          Gets (incoming) conversion rules to convert group1 into urn:collab:groups:nl.myuniversity:group1
 GroupProviderType getGroupProviderType()
           
 Long getId()
           
 String getIdentifier()
           
 String getLogoUrl()
           
 String getName()
           
 List<ConversionRule> getPersonDecorators()
          Gets (outgoing) conversion rules to convert an urn:collab:person:nl.myuniversity:s123456 into s123456
 List<ConversionRule> getPersonFilters()
          Gets (incoming) conversion rules to convert s123456 into urn:collab:person:nl.myuniversity:s123456
 List<ServiceProviderGroupAcl> getServiceProviderGroupAcls()
           
 String getUserIdPrecondition()
          Regex pattern a user id must match in order to use this GroupProvider.
 int hashCode()
           
 boolean isExternalGroupProvider()
           
 boolean isMeantForUser(String userId)
          Checks if the user identifier matches the precondition for this group provider
 void setAllowedOptions(Map<String,Object> allowedOptions)
          Sets a Map with possible configuration options for the Group provider.
 void setGroupDecorators(List<ConversionRule> groupDecorators)
          Sets (outgoing) conversion rules to convert an urn:collab:groups:nl.myuniversity:group1 into group1
 void setGroupFilters(List<ConversionRule> groupFilters)
          Sets (incoming) conversion rules to convert group1 into urn:collab:groups:nl.myuniversity:group1
 void setLogoUrl(String logoUrl)
           
 void setPersonDecorators(List<ConversionRule> personDecorators)
          Sets (outgoing) conversion rules to convert an urn:collab:person:nl.myuniversity:s123456 into s123456
 void setPersonFilters(List<ConversionRule> personFilters)
          Sets (incoming) conversion rules to convert s123456 into urn:collab:person:nl.myuniversity:s123456
 void setServiceProviderGroupAcls(List<ServiceProviderGroupAcl> serviceProviderGroupAcls)
           
 void setUserIdPrecondition(String userIdPrecondition)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GroupProvider

public GroupProvider()

GroupProvider

public GroupProvider(Long id,
                     String identifier,
                     String name,
                     String groupProviderType)

GroupProvider

public GroupProvider(Long id,
                     String identifier,
                     String name,
                     GroupProviderType type)
Method Detail

getId

public Long getId()
Returns:
unique identifier of the group provider

getIdentifier

public String getIdentifier()
Returns:
human readable unique identifier of the group provider

getName

public String getName()
Returns:
name of the group provider

getGroupProviderType

public GroupProviderType getGroupProviderType()
Returns:
GroupProviderType type of group provider

getAllowedOptions

public Map<String,Object> getAllowedOptions()
Returns:
a Map with possible configuration options for the Group provider

addAllowedOption

public void addAllowedOption(String key,
                             Object value)
Add a configuration option

Parameters:
key - the key
value - the value

setAllowedOptions

public void setAllowedOptions(Map<String,Object> allowedOptions)
Sets a Map with possible configuration options for the Group provider.

Parameters:
allowedOptions - allowed options for a Group provider

getAllowedOptionAsString

public String getAllowedOptionAsString(String key)
Convenience method for allowed options

Parameters:
key - of the allowed option
Returns:
String value of an allowed option. Can be null

getUserIdPrecondition

public String getUserIdPrecondition()
Regex pattern a user id must match in order to use this GroupProvider. If null, then all users can use this Group Provider.

Returns:
regex pattern or null

setUserIdPrecondition

public void setUserIdPrecondition(String userIdPrecondition)
Parameters:
userIdPrecondition - regex pattern the user id must match.

getGroupDecorators

public List<ConversionRule> getGroupDecorators()
Gets (outgoing) conversion rules to convert an urn:collab:groups:nl.myuniversity:group1 into group1

Returns:
List of ConversionRule's

setGroupDecorators

public void setGroupDecorators(List<ConversionRule> groupDecorators)
Sets (outgoing) conversion rules to convert an urn:collab:groups:nl.myuniversity:group1 into group1

Parameters:
groupDecorators - List of ConversionRule's

addGroupDecorator

public void addGroupDecorator(ConversionRule groupIdDecorator)
Adds a single (outgoing) group id conversion rule

Parameters:
groupIdDecorator - ConversionRule

getGroupFilters

public List<ConversionRule> getGroupFilters()
Gets (incoming) conversion rules to convert group1 into urn:collab:groups:nl.myuniversity:group1

Returns:
List of ConversionRule's

setGroupFilters

public void setGroupFilters(List<ConversionRule> groupFilters)
Sets (incoming) conversion rules to convert group1 into urn:collab:groups:nl.myuniversity:group1

Parameters:
groupFilters - List of ConversionRule's

addGroupFilter

public void addGroupFilter(ConversionRule groupIdFilter)
Adds single (incoming) group id conversion rule

Parameters:
groupIdFilter - ConversionRule

getPersonDecorators

public List<ConversionRule> getPersonDecorators()
Gets (outgoing) conversion rules to convert an urn:collab:person:nl.myuniversity:s123456 into s123456

Returns:
List of ConversionRule's

setPersonDecorators

public void setPersonDecorators(List<ConversionRule> personDecorators)
Sets (outgoing) conversion rules to convert an urn:collab:person:nl.myuniversity:s123456 into s123456

Parameters:
personDecorators - List of ConversionRule's

addPersonDecorator

public void addPersonDecorator(ConversionRule personIdDecorator)
Adds single (outgoing) person id conversion rule

Parameters:
personIdDecorator - ConversionRule

getPersonFilters

public List<ConversionRule> getPersonFilters()
Gets (incoming) conversion rules to convert s123456 into urn:collab:person:nl.myuniversity:s123456

Returns:
List of ConversionRule's

setPersonFilters

public void setPersonFilters(List<ConversionRule> personFilters)
Sets (incoming) conversion rules to convert s123456 into urn:collab:person:nl.myuniversity:s123456

Parameters:
personFilters - List of ConversionRule's

addPersonFilter

public void addPersonFilter(ConversionRule personIdFilter)
Adds single (incoming) person id filter

Parameters:
personIdFilter - ConversionRule

isMeantForUser

public boolean isMeantForUser(String userId)
Checks if the user identifier matches the precondition for this group provider

Parameters:
userId - urn for the user
Returns:
true if the urn for this user matches the precondition

getLogoUrl

public String getLogoUrl()
Returns:
location of the logo for this group provider

setLogoUrl

public void setLogoUrl(String logoUrl)

isExternalGroupProvider

public boolean isExternalGroupProvider()

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

getServiceProviderGroupAcls

public List<ServiceProviderGroupAcl> getServiceProviderGroupAcls()
Returns:
the serviceProviderGroupAcls

setServiceProviderGroupAcls

public void setServiceProviderGroupAcls(List<ServiceProviderGroupAcl> serviceProviderGroupAcls)
Parameters:
serviceProviderGroupAcls - the serviceProviderGroupAcls to set

addServiceProviderGroupAcl

public void addServiceProviderGroupAcl(ServiceProviderGroupAcl serviceProviderGroupAcl)


Copyright © 2009-2013 SURFnet bv, The Netherlands. All Rights Reserved.