| Constructor and Description |
|---|
BaseConfigurationService() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addListToStringBuilder(StringBuilder buf,
List list,
int indent,
int indentIncrement) |
protected void |
addMapToStringBuilder(StringBuilder buf,
Map map,
int indent,
int indentIncrement) |
void |
destroy() |
protected org.sakaiproject.authz.api.SecurityAdvisor |
enableSecurityAdvisor()
Establish a security advisor to allow the "embedded" azg work to occur
with no need for additional security permissions.
|
String |
getAdminSiteName() |
Collection<String> |
getAllCategoryXml() |
String |
getConfigFolder() |
String |
getConfigFolderId() |
String |
getConfigFolderReference() |
org.sakaiproject.citation.api.SiteOsidConfiguration |
getConfigurationHandler(String osidConfigHandler)
Return a SiteOsidConfiguration instance
|
protected String |
getConfigurationParameter(String parameter)
Get a named value from the site-specific XML configuration file
|
String |
getConfigurationXml()
Fetch the appropriate XML configuration document for this user
|
String |
getConfigXmlCache() |
String |
getDatabaseHierarchyXml()
Fetch the appropriate XML database hierarchy document for this user
|
String |
getDatabaseXml() |
String |
getDatabaseXmlCache() |
String |
getExtendedRepositoryId() |
String |
getExternalSearchUrl() |
String |
getGoogleBaseUrl() |
String |
getGoogleSearchEnabled() |
List<String> |
getGroupIds()
Fetch this user's group affiliations
|
String |
getLibrarySearchEnabled() |
String |
getMetasearchBaseUrl() |
String |
getMetasearchPassword() |
String |
getMetasearchUsername() |
String |
getOpenUrlLabel() |
String |
getOpenUrlResolverAddress() |
String |
getOsidConfig() |
String |
getOsidImpl() |
String |
getSakaiServerKey() |
Map<String,List<Map<String,String>>> |
getSaveciteClients() |
List<Map<String,String>> |
getSaveciteClientsForLocale(Locale locale) |
String |
getSecondsBetweenSaveciteRefreshes() |
org.sakaiproject.component.api.ServerConfigurationService |
getServerConfigurationService() |
org.sakaiproject.tool.api.SessionManager |
getSessionManager() |
String |
getSiteConfigExtendedRepositoryId()
Fetch the site specific extended Repository ID
|
String |
getSiteConfigGoogleBaseUrl()
Fetch the Google base-URL
|
int |
getSiteConfigMaximumSearchableDBs()
Get the maximum number of databases we can search at one time
|
String |
getSiteConfigMetasearchBaseUrl()
Fetch the meta-search base-URL
|
String |
getSiteConfigMetasearchPassword()
Fetch the meta-search password
|
String |
getSiteConfigMetasearchUsername()
Fetch the meta-search username
|
String |
getSiteConfigOpenUrlLabel()
Fetch the OpenURL label
|
String |
getSiteConfigOpenUrlResolverAddress()
Fetch the OpenURL resolver address
|
String |
getSiteConfigOsidPackageName()
Fetch the site specific Repository OSID package name
|
String |
getSiteConfigPreferredUrlPrefix()
Prefix string for "preferred" URLs (when used as title or related links).
|
String |
getSiteConfigSakaiServerKey()
Fetch the Sakai server key
|
String |
getSiteConfigUsePreferredUrls()
How should we use URLs marked as "preferred" by the OSID implementation?
|
String |
getSiteConfigXml() |
protected org.sakaiproject.citation.api.SiteOsidConfiguration |
getSiteOsidConfiguration()
Load and initialize the site-specific OSID configuration code
|
protected String |
getText(Document root,
String elementName)
Get the text associated with this element
|
protected String |
getText(Element root,
String elementName)
Get the text associated with this element
|
protected DocumentBuilder |
getXmlDocumentBuilder()
Get a DOM Document builder.
|
void |
init() |
boolean |
isAllowSiteBySiteOverride()
Is the Citations Helper enabled site-by-site?
|
boolean |
isCitationsEnabledByDefault()
Is the Citations Helper [potentially] available for all sites?
|
boolean |
isConfigurationXmlAvailable()
Is the configuration XML file provided and readable
|
boolean |
isDatabaseHierarchyXmlAvailable()
Is the database hierarchy XML file provided and readable
|
boolean |
isExternalSerarchEnabled() |
boolean |
isGoogleScholarEnabled()
Is Google search enabled?
|
boolean |
isLibrarySearchEnabled()
Is library search enabled for any users?
|
boolean |
librarySearchEnabled()
Is library search enabled for the current user?
|
protected String |
normalizeText(String original,
String update)
"Normalize" XML text node content to create a simple string
|
protected Document |
parseXmlFromStream(InputStream stream)
Parse an XML resource
|
void |
populateConfig(String configurationXml,
InputStream stream)
Populate cached values from a configuration XML resource.
|
protected void |
saveParameter(Document document,
Map parameterMap,
String name)
Lookup and save one dynamic configuration parameter
|
protected void |
saveServletClientMappings(Document document) |
void |
setAdminSiteName(String adminSiteName) |
void |
setAllowSiteBySiteOverride(boolean allowSiteBySiteOverride)
Enable/disable site by site Citations Helper override
|
void |
setCitationsEnabledByDefault(boolean citationsEnabledByDefault)
Enable/disable Citations Helper by default
|
void |
setConfigFolder(String configFolder) |
void |
setConfigXmlCache(String configXml) |
void |
setDatabaseXml(String databaseXml) |
void |
setDatabaseXmlCache(String categoriesXml) |
void |
setExtendedRepositoryId(String extendedRepositoryId) |
void |
setExternalSearchEnabled(boolean state) |
void |
setExternalSearchUrl(String url) |
void |
setGoogleBaseUrl(String googleBaseUrl) |
void |
setGoogleScholarEnabled(boolean state)
Enable/disable Google support (no support for site specific XML configuration)
|
void |
setGoogleSearchEnabled(String googleSearchEnabled) |
void |
setLibrarySearchEnabled(boolean state)
Enable/disable library search support (no support for site specific XML configuration)
|
void |
setLibrarySearchEnabled(String librarySearchEnabled) |
void |
setMetasearchBaseUrl(String baseUrl) |
void |
setMetasearchPassword(String password) |
void |
setMetasearchUsername(String username) |
void |
setOpenUrlLabel(String openUrlLabel) |
void |
setOpenUrlResolverAddress(String openUrlResolverAddress) |
void |
setOsidConfig(String osidConfig) |
void |
setOsidImpl(String osidImpl) |
void |
setSakaiServerKey(String sakaiId) |
void |
setSaveciteClients(Map<String,List<Map<String,String>>> saveciteClients) |
void |
setServerConfigurationService(org.sakaiproject.component.api.ServerConfigurationService serverConfigurationService) |
void |
setSessionManager(org.sakaiproject.tool.api.SessionManager sessionManager) |
void |
setSiteConfigXml(String siteConfigXml) |
void |
update(Observable arg0,
Object arg1)
Called when an observed object chnages (@see java.util.Observer#update)
|
protected void |
updateConfig(String configFileRef)
Update configuration data from an XML resource
|
public static final String DEFAULT_SECONDS_BETWEEN_SAVECITE_REFRESHES
public static final int MAXIMUM_SECONDS_BETWEEN_SAVECITE_REFRESHES
public static final String PARAM_SECONDS_BETWEEN_SAVECITE_REFRESHES
protected boolean m_citationsEnabledByDefault
protected boolean m_allowSiteBySiteOverride
protected String m_googleSearchEnabled
protected String m_librarySearchEnabled
protected boolean m_externalSearchEnabled
protected String m_adminSiteName
protected String m_configFolder
protected String m_configXml
protected String m_categoriesXml
protected String m_databaseXml
protected String m_siteConfigXml
protected String m_metasearchUsername
protected String m_metasearchPassword
protected String m_metasearchBaseUrl
protected String m_osidImpl
protected String m_extendedRepositoryId
protected String m_openUrlLabel
protected String m_openUrlResolverAddress
protected String m_googleBaseUrl
protected String m_sakaiServerKey
protected String m_externalSearchUrl
protected String m_osidConfig
protected org.sakaiproject.tool.api.SessionManager m_sessionManager
protected org.sakaiproject.component.api.ServerConfigurationService m_serverConfigurationService
protected static String m_configListRef
public String getConfigurationXml() throws org.sakaiproject.citation.util.api.OsidConfigurationException
getConfigurationXml in interface org.sakaiproject.citation.api.ConfigurationServiceorg.sakaiproject.citation.util.api.OsidConfigurationExceptionpublic boolean isConfigurationXmlAvailable()
isConfigurationXmlAvailable in interface org.sakaiproject.citation.api.ConfigurationServicepublic String getConfigFolderReference()
getConfigFolderReference in interface org.sakaiproject.citation.api.ConfigurationServicepublic String getConfigFolderId()
getConfigFolderId in interface org.sakaiproject.citation.api.ConfigurationServicepublic String getDatabaseHierarchyXml() throws org.sakaiproject.citation.util.api.OsidConfigurationException
getDatabaseHierarchyXml in interface org.sakaiproject.citation.api.ConfigurationServiceorg.sakaiproject.citation.util.api.OsidConfigurationExceptionpublic boolean isDatabaseHierarchyXmlAvailable()
isDatabaseHierarchyXmlAvailable in interface org.sakaiproject.citation.api.ConfigurationServicepublic List<String> getGroupIds() throws org.sakaiproject.citation.util.api.OsidConfigurationException
getGroupIds in interface org.sakaiproject.citation.api.ConfigurationServiceorg.sakaiproject.citation.util.api.OsidConfigurationExceptionpublic String getSiteConfigOsidPackageName()
getSiteConfigOsidPackageName in interface org.sakaiproject.citation.api.ConfigurationServicepublic String getSiteConfigExtendedRepositoryId()
getSiteConfigExtendedRepositoryId in interface org.sakaiproject.citation.api.ConfigurationServicepublic String getSiteConfigMetasearchUsername()
getSiteConfigMetasearchUsername in interface org.sakaiproject.citation.api.ConfigurationServicepublic String getSiteConfigMetasearchPassword()
getSiteConfigMetasearchPassword in interface org.sakaiproject.citation.api.ConfigurationServicepublic String getSiteConfigMetasearchBaseUrl()
getSiteConfigMetasearchBaseUrl in interface org.sakaiproject.citation.api.ConfigurationServicepublic String getSiteConfigOpenUrlLabel()
getSiteConfigOpenUrlLabel in interface org.sakaiproject.citation.api.ConfigurationServicepublic String getSiteConfigOpenUrlResolverAddress()
getSiteConfigOpenUrlResolverAddress in interface org.sakaiproject.citation.api.ConfigurationServicepublic String getSiteConfigGoogleBaseUrl()
getSiteConfigGoogleBaseUrl in interface org.sakaiproject.citation.api.ConfigurationServicepublic String getSiteConfigSakaiServerKey()
getSiteConfigSakaiServerKey in interface org.sakaiproject.citation.api.ConfigurationServicepublic int getSiteConfigMaximumSearchableDBs()
getSiteConfigMaximumSearchableDBs in interface org.sakaiproject.citation.api.ConfigurationServiceSEARCHABLE_DATABASES
if no other value is specified)public String getSiteConfigUsePreferredUrls()
getSiteConfigUsePreferredUrls in interface org.sakaiproject.citation.api.ConfigurationServicepublic String getSiteConfigPreferredUrlPrefix()
getSiteConfigPreferredUrlPrefix in interface org.sakaiproject.citation.api.ConfigurationServicepublic void setCitationsEnabledByDefault(boolean citationsEnabledByDefault)
setCitationsEnabledByDefault in interface org.sakaiproject.citation.api.ConfigurationServicestate - true to set default 'On'public boolean isCitationsEnabledByDefault()
isCitationsEnabledByDefault in interface org.sakaiproject.citation.api.ConfigurationServicepublic void setAllowSiteBySiteOverride(boolean allowSiteBySiteOverride)
setAllowSiteBySiteOverride in interface org.sakaiproject.citation.api.ConfigurationServicestate - true to enable site by site Citations Helperpublic boolean isAllowSiteBySiteOverride()
isAllowSiteBySiteOverride in interface org.sakaiproject.citation.api.ConfigurationServicepublic void setGoogleScholarEnabled(boolean state)
setGoogleScholarEnabled in interface org.sakaiproject.citation.api.ConfigurationServicestate - true to enable Google supportpublic boolean isGoogleScholarEnabled()
isGoogleScholarEnabled in interface org.sakaiproject.citation.api.ConfigurationServicepublic void setLibrarySearchEnabled(boolean state)
setLibrarySearchEnabled in interface org.sakaiproject.citation.api.ConfigurationServicestate - true to enable supportpublic boolean isLibrarySearchEnabled()
isLibrarySearchEnabled in interface org.sakaiproject.citation.api.ConfigurationServiceprotected String getConfigurationParameter(String parameter)
parameter - Configuration parameter to lookupprotected org.sakaiproject.citation.api.SiteOsidConfiguration getSiteOsidConfiguration()
public org.sakaiproject.citation.api.SiteOsidConfiguration getConfigurationHandler(String osidConfigHandler) throws ClassNotFoundException, InstantiationException, IllegalAccessException
ClassNotFoundExceptionInstantiationExceptionIllegalAccessExceptionpublic void populateConfig(String configurationXml, InputStream stream)
configurationXml - Configuration resource name (this doubles as a
unique key into the configuration cache)protected void saveServletClientMappings(Document document)
protected void saveParameter(Document document, Map parameterMap, String name)
Configuration - XMLparameterMap - Parameter name=value pairsname - Parameter nameprotected Document parseXmlFromStream(InputStream stream)
filename - The filename (or URI) to parseprotected DocumentBuilder getXmlDocumentBuilder()
edu.indiana.lib.twinpeaks.util.DomExceptionprotected String normalizeText(String original, String update)
original - Original textupdate - Text to add to the original string (a space separates the two)protected String getText(Document root, String elementName)
root - The document containing the text elementprotected String getText(Element root, String elementName)
root - The root node of the text elementpublic void init()
public void destroy()
public String getOsidImpl()
public void setOsidImpl(String osidImpl)
osidImpl - the OSID package namepublic String getExtendedRepositoryId()
public void setExtendedRepositoryId(String extendedRepositoryId)
extendedRepositoryId - the extended Repository IDpublic String getMetasearchUsername()
public void setMetasearchUsername(String username)
username - the m_metasearchUsername to setpublic String getMetasearchBaseUrl()
public void setMetasearchBaseUrl(String baseUrl)
baseUrl - the m_metasearchBaseUrl to setpublic String getMetasearchPassword()
public void setMetasearchPassword(String password)
password - the m_metasearchPassword to setpublic String getGoogleBaseUrl()
public void setGoogleBaseUrl(String googleBaseUrl)
googleBaseUrl - the base URL to setpublic String getSakaiServerKey()
public void setSakaiServerKey(String sakaiId)
sakaiServerKey - the sakaiServerKey to setpublic String getOpenUrlLabel()
public void setOpenUrlLabel(String openUrlLabel)
set - the OpenURL labelpublic String getOpenUrlResolverAddress()
public void setOpenUrlResolverAddress(String openUrlResolverAddress)
set - the OpenURL resolver addresspublic String getDatabaseXml()
public void setDatabaseXml(String databaseXml)
set - the database hierarchy XML filename/URIpublic String getSiteConfigXml()
public void setSiteConfigXml(String siteConfigXml)
set - the configuration XML filename/URIpublic org.sakaiproject.component.api.ServerConfigurationService getServerConfigurationService()
public void setServerConfigurationService(org.sakaiproject.component.api.ServerConfigurationService serverConfigurationService)
serverConfigurationService - the serverConfigurationService to setpublic void setSessionManager(org.sakaiproject.tool.api.SessionManager sessionManager)
sessionManager - the SessionManager to savepublic org.sakaiproject.tool.api.SessionManager getSessionManager()
public String getOsidConfig()
public void setOsidConfig(String osidConfig)
osidConfig - the site specific "OSID configuration" package namepublic String getGoogleSearchEnabled()
public void setGoogleSearchEnabled(String googleSearchEnabled)
googleSearchEnabled - ("true" or "false")public String getLibrarySearchEnabled()
public void setLibrarySearchEnabled(String librarySearchEnabled)
librarySearchEnabled - ("true" or "false")public String getAdminSiteName()
public void setAdminSiteName(String adminSiteName)
adminSiteName - the adminSiteName to setpublic String getConfigFolder()
public void setConfigFolder(String configFolder)
configFolder - the configFolder to setpublic String getConfigXmlCache()
public void setConfigXmlCache(String configXml)
configFile - the configFile to setpublic String getDatabaseXmlCache()
public void setDatabaseXmlCache(String categoriesXml)
categoriesXml - the categoriesXml to setpublic Map<String,List<Map<String,String>>> getSaveciteClients()
getSaveciteClients in interface org.sakaiproject.citation.api.ConfigurationServicepublic void setSaveciteClients(Map<String,List<Map<String,String>>> saveciteClients)
saveciteClients - the saveciteClients to setpublic List<Map<String,String>> getSaveciteClientsForLocale(Locale locale)
getSaveciteClientsForLocale in interface org.sakaiproject.citation.api.ConfigurationServiceprotected void addMapToStringBuilder(StringBuilder buf, Map map, int indent, int indentIncrement)
protected void addListToStringBuilder(StringBuilder buf, List list, int indent, int indentIncrement)
public Collection<String> getAllCategoryXml()
getAllCategoryXml in interface org.sakaiproject.citation.api.ConfigurationServicepublic void update(Observable arg0, Object arg1)
protected void updateConfig(String configFileRef)
configFileRef - XML configuration reference (/content/...)protected org.sakaiproject.authz.api.SecurityAdvisor enableSecurityAdvisor()
public boolean librarySearchEnabled()
librarySearchEnabled in interface org.sakaiproject.citation.api.ConfigurationServicepublic void setExternalSearchEnabled(boolean state)
setExternalSearchEnabled in interface org.sakaiproject.citation.api.ConfigurationServicepublic boolean isExternalSerarchEnabled()
isExternalSerarchEnabled in interface org.sakaiproject.citation.api.ConfigurationServicepublic void setExternalSearchUrl(String url)
setExternalSearchUrl in interface org.sakaiproject.citation.api.ConfigurationServicepublic String getExternalSearchUrl()
getExternalSearchUrl in interface org.sakaiproject.citation.api.ConfigurationServicepublic String getSecondsBetweenSaveciteRefreshes()
getSecondsBetweenSaveciteRefreshes in interface org.sakaiproject.citation.api.ConfigurationServiceCopyright © 2003-2015 The Sakai Foundation. All Rights Reserved.