Class SelfEditingConfiguration
- java.lang.Object
-
- edu.cornell.mannlib.vitro.webapp.beans.SelfEditingConfiguration
-
public class SelfEditingConfiguration extends Object
Holds the configuration properties used in Self-Editing, and some commonly used methods on those properties.
-
-
Constructor Summary
Constructors Constructor Description SelfEditingConfiguration(String selfEditingIdMatchingProperty)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidassociateIndividualWithUserAccount(IndividualDao indDao, DataPropertyStatementDao dpsDao, UserAccount user, String associatedIndividualUri)This Individual, if it exists, should be associated with this UserAccount.List<Individual>getAssociatedIndividuals(IndividualDao indDao, UserAccount user)Get all Individuals associated with this user through the matching property.List<Individual>getAssociatedIndividuals(IndividualDao indDao, String externalAuthId)Get all Individuals associated with this externalAuthId through the matching property.static SelfEditingConfigurationgetBean(javax.servlet.ServletContext ctx)Get the bean from the context.static SelfEditingConfigurationgetBean(javax.servlet.ServletRequest request)Get the bean from the context.static SelfEditingConfigurationgetInstance()StringgetMatchingPropertyUri()What is the matching property? (might be null).booleanisConfigured()Find out whether there is a matching property at all.StringtoString()
-
-
-
Constructor Detail
-
SelfEditingConfiguration
public SelfEditingConfiguration(String selfEditingIdMatchingProperty)
-
-
Method Detail
-
getInstance
public static SelfEditingConfiguration getInstance()
-
getBean
public static SelfEditingConfiguration getBean(javax.servlet.ServletRequest request)
Get the bean from the context. If there no bean, create one on the fly and store it in the context. Never returns null.
-
getBean
public static SelfEditingConfiguration getBean(javax.servlet.ServletContext ctx)
Get the bean from the context. If there no bean, create one on the fly and store it in the context. Never returns null.
-
isConfigured
public boolean isConfigured()
Find out whether there is a matching property at all.
-
getMatchingPropertyUri
public String getMatchingPropertyUri()
What is the matching property? (might be null). TODO This seems to expose the property unnecessarily, but how else can I do a SPARQL query for the Individual profiles that don't have matching property values?
-
getAssociatedIndividuals
public List<Individual> getAssociatedIndividuals(IndividualDao indDao, UserAccount user)
Get all Individuals associated with this user through the matching property. Never returns null.
-
getAssociatedIndividuals
public List<Individual> getAssociatedIndividuals(IndividualDao indDao, String externalAuthId)
Get all Individuals associated with this externalAuthId through the matching property. If the externalAuthId is empty or null, it won't match anything, even though many individuals might have empty matching properties. Never returns null.
-
associateIndividualWithUserAccount
public void associateIndividualWithUserAccount(IndividualDao indDao, DataPropertyStatementDao dpsDao, UserAccount user, String associatedIndividualUri)
This Individual, if it exists, should be associated with this UserAccount. No other Individual should be associated with this UserAccount.
-
-