public abstract class BaseLTIService extends Object implements org.sakaiproject.lti.api.LTIService
Implements the LTIService, all but a Storage model.
Modifier and Type | Field and Description |
---|---|
protected static SakaiFoorm |
foorm |
String |
LAUNCH_PREFIX |
protected org.sakaiproject.event.api.EventTrackingService |
m_eventTrackingService
Dependency: EventTrackingService
|
protected org.sakaiproject.tool.api.SessionManager |
m_sessionManager
Dependency: SessionManager
|
protected org.sakaiproject.event.api.UsageSessionService |
m_usageSessionService
Dependency: UsageSessionService
|
protected org.sakaiproject.user.api.UserDirectoryService |
m_userDirectoryService
Dependency: UserDirectoryService
|
protected static org.sakaiproject.util.ResourceLoader |
rb
Resource bundle using current language locale
|
protected org.sakaiproject.authz.api.SecurityService |
securityService |
protected org.sakaiproject.site.api.SiteService |
siteService |
protected org.sakaiproject.tool.api.ToolManager |
toolManager |
BINDING_MODEL, CONTENT_MODEL, DEPLOY_MODEL, LTI_ALLOWCONSUMERKEY, LTI_ALLOWCUSTOM, LTI_ALLOWFRAMEHEIGHT, LTI_ALLOWLAUNCH, LTI_ALLOWLORI, LTI_ALLOWOUTCOMES, LTI_ALLOWPAGETITLE, LTI_ALLOWROSTER, LTI_ALLOWSECRET, LTI_ALLOWSETTINGS, LTI_ALLOWTITLE, LTI_CONSUMERKEY, LTI_CREATED_AT, LTI_CUSTOM, LTI_DEBUG, LTI_DEPLOYMENT_ID, LTI_DESCRIPTION, LTI_ENABLED_CAPABILITY, LTI_FRAMEHEIGHT, LTI_ID, LTI_LAUNCH, LTI_MATCHPATTERN, LTI_NEWPAGE, LTI_NOTE, LTI_OLDPLACEMENTSECRET, LTI_PAGETITLE, LTI_PARAMETER, LTI_PLACEMENT, LTI_PLACEMENTSECRET, LTI_REG_KEY, LTI_REG_LAUNCH, LTI_REG_PASSWORD, LTI_REG_PROFILE, LTI_REG_STATE, LTI_REG_STATE_REGISTERED, LTI_RESOURCE_HANDLER, LTI_SECRET, LTI_SECRET_INCOMPLETE, LTI_SENDEMAILADDR, LTI_SENDNAME, LTI_SETTINGS, LTI_SETTINGS_EXT, LTI_SITE_ID, LTI_SPLASH, LTI_STATUS, LTI_TITLE, LTI_TOOL_ID, LTI_UPDATED_AT, LTI_VERSION, LTI_VERSION_1, LTI_VERSION_2, LTI_VISIBLE, LTI_XMLIMPORT, REFERENCE_ROOT, TOOL_MODEL, WEB_PORTLET
Constructor and Description |
---|
BaseLTIService() |
Modifier and Type | Method and Description |
---|---|
boolean |
deleteContent(Long key) |
protected abstract boolean |
deleteContentDao(Long key,
String siteId,
boolean isAdminRole,
boolean isMaintainRole) |
String |
deleteContentLink(Long key) |
String |
deleteContentLinkDao(Long key,
String siteId) |
protected String |
deleteContentLinkDao(Long key,
String siteId,
boolean isAdminRole,
boolean isMaintainRole) |
boolean |
deleteDeployDao(Long key) |
abstract boolean |
deleteProxyBindingDao(Long key) |
boolean |
deleteTool(Long key) |
boolean |
deleteToolDao(Long key,
String siteId) |
void |
destroy()
Returns to uninitialized state.
|
void |
filterContent(Map<String,Object> content,
Map<String,Object> tool) |
String |
formInput(Object row,
String fieldInfo) |
String |
formInput(Object row,
String[] fieldInfo) |
String |
formOutput(Object row,
String fieldInfo) |
String |
formOutput(Object row,
String[] fieldInfo) |
Map<String,Object> |
getContent(Long key) |
Map<String,Object> |
getContent(Long key,
String siteId) |
Map<String,Object> |
getContentDao(Long key) |
Map<String,Object> |
getContentDao(Long key,
String siteId) |
protected abstract Map<String,Object> |
getContentDao(Long key,
String siteId,
boolean isAdminRole) |
String |
getContentLaunch(Map<String,Object> content) |
String[] |
getContentModel(Long tool_id) |
String[] |
getContentModel(Map<String,Object> tool) |
protected String[] |
getContentModelDao(Map<String,Object> tool,
boolean isAdminRole) |
List<Map<String,Object>> |
getContents(String search,
String order,
int first,
int last) |
List<Map<String,Object>> |
getContentsDao(String search,
String order,
int first,
int last,
String siteId) |
protected abstract List<Map<String,Object>> |
getContentsDao(String search,
String order,
int first,
int last,
String siteId,
boolean isAdminRole) |
protected String |
getContext() |
static Integer |
getCorrectProperty(String propName,
Map<String,Object> content,
Map<String,Object> tool) |
Map<String,Object> |
getDeployDao(Long key) |
protected abstract Map<String,Object> |
getDeployDao(Long key,
String siteId,
boolean isAdminRole) |
String[] |
getDeployModel() |
List<Map<String,Object>> |
getDeploysDao(String search,
String order,
int first,
int last) |
protected abstract List<Map<String,Object>> |
getDeploysDao(String search,
String order,
int first,
int last,
String siteId,
boolean isAdminRole) |
static int |
getInt(Object o) |
abstract Map<String,Object> |
getProxyBindingDao(Long key) |
abstract Map<String,Object> |
getProxyBindingDao(Long tool_id,
String siteId) |
protected void |
getServices()
Pull in any necessary services using factory pattern
|
Map<String,Object> |
getTool(Long key) |
Map<String,Object> |
getTool(String url) |
Map<String,Object> |
getToolDao(Long key,
String siteId) |
protected abstract Map<String,Object> |
getToolDao(Long key,
String siteId,
boolean isAdminRole) |
String[] |
getToolModel()
LTIService implementation
|
String[] |
getToolModelDao() |
String[] |
getToolModelDao(boolean isAdminRole) |
List<Map<String,Object>> |
getTools(String search,
String order,
int first,
int last) |
List<Map<String,Object>> |
getToolsDao(String search,
String order,
int first,
int last,
String siteId) |
protected abstract List<Map<String,Object>> |
getToolsDao(String search,
String order,
int first,
int last,
String siteId,
boolean isAdminRole) |
void |
init()
Final initialization, once all dependencies are set.
|
Object |
insertContent(Properties newProps) |
Object |
insertContentDao(Properties newProps,
String siteId) |
protected abstract Object |
insertContentDao(Properties newProps,
String siteId,
boolean isAdminRole,
boolean isMaintainRole) |
Object |
insertDeployDao(Properties newProps) |
protected abstract Object |
insertDeployDao(Properties newProps,
String siteId,
boolean isAdminRole,
boolean isMaintainRole) |
abstract Object |
insertProxyBindingDao(Properties newProps) |
Object |
insertTool(Map<String,Object> newProps) |
Object |
insertTool(Properties newProps) |
Object |
insertToolContent(String id,
String toolId,
Properties reqProps) |
Object |
insertToolContent(String id,
String toolId,
Properties reqProps,
String siteId) |
protected Object |
insertToolContentDao(String id,
String toolId,
Properties reqProps,
String siteId,
boolean isAdminRole,
boolean isMaintainRole) |
protected abstract Object |
insertToolDao(Object newProps,
String siteId,
boolean isAdminRole,
boolean isMaintainRole) |
Object |
insertToolDao(Properties newProps,
String siteId) |
Object |
insertToolSiteLink(String id,
String button_text) |
Object |
insertToolSiteLink(String id,
String button_text,
String siteId) |
protected Object |
insertToolSiteLinkDao(String id,
String button_text,
String siteId,
boolean isAdminRole,
boolean isMaintainRole) |
boolean |
isAdmin() |
protected boolean |
isAdmin(String siteId) |
boolean |
isMaintain() |
protected boolean |
isMaintain(String siteId) |
void |
setEventTrackingService(org.sakaiproject.event.api.EventTrackingService service)
Dependency: EventTrackingService.
|
void |
setSessionManager(org.sakaiproject.tool.api.SessionManager service)
Dependency: SessionManager.
|
void |
setUsageSessionService(org.sakaiproject.event.api.UsageSessionService service)
Dependency: UsageSessionService.
|
void |
setUserDirectoryService(org.sakaiproject.user.api.UserDirectoryService service)
Dependency: UserDirectoryService.
|
Object |
updateContent(Long key,
Map<String,Object> newProps) |
Object |
updateContent(Long key,
Object newProps) |
Object |
updateContent(Long key,
Properties newProps) |
Object |
updateContent(Long key,
Properties newProps,
String siteId) |
Object |
updateContentDao(Long key,
Map<String,Object> newProps,
String siteId) |
protected abstract Object |
updateContentDao(Long key,
Object newProps,
String siteId,
boolean isAdminRole,
boolean isMaintainRole) |
Object |
updateDeployDao(Long key,
Object newProps) |
protected abstract Object |
updateDeployDao(Long key,
Object newProps,
String siteId,
boolean isAdminRole,
boolean isMaintainRole) |
abstract Object |
updateProxyBindingDao(Long key,
Object newProps) |
Object |
updateTool(Long key,
Map<String,Object> newProps)
Simple API signature for the update series of methods
|
protected Object |
updateTool(Long key,
Object newProps) |
Object |
updateTool(Long key,
Properties newProps)
Simple API signature for the update series of methods
|
Object |
updateToolDao(Long key,
Map<String,Object> newProps,
String siteId) |
abstract Object |
updateToolDao(Long key,
Object newProps,
String siteId,
boolean isAdminRole,
boolean isMaintainRole) |
public final String LAUNCH_PREFIX
protected static org.sakaiproject.util.ResourceLoader rb
protected static SakaiFoorm foorm
protected org.sakaiproject.tool.api.SessionManager m_sessionManager
protected org.sakaiproject.event.api.UsageSessionService m_usageSessionService
protected org.sakaiproject.user.api.UserDirectoryService m_userDirectoryService
protected org.sakaiproject.event.api.EventTrackingService m_eventTrackingService
protected org.sakaiproject.authz.api.SecurityService securityService
protected org.sakaiproject.site.api.SiteService siteService
protected org.sakaiproject.tool.api.ToolManager toolManager
public void setSessionManager(org.sakaiproject.tool.api.SessionManager service)
service
- The SessionManager.public void setUsageSessionService(org.sakaiproject.event.api.UsageSessionService service)
service
- The UsageSessionService.public void setUserDirectoryService(org.sakaiproject.user.api.UserDirectoryService service)
service
- The UserDirectoryService.public void setEventTrackingService(org.sakaiproject.event.api.EventTrackingService service)
service
- The EventTrackingService.protected void getServices()
public void init()
public void destroy()
public String[] getToolModel()
getToolModel
in interface org.sakaiproject.lti.api.LTIService
public String[] getToolModelDao()
public String[] getToolModelDao(boolean isAdminRole)
public String[] getContentModel(Long tool_id)
getContentModel
in interface org.sakaiproject.lti.api.LTIService
public String[] getContentModel(Map<String,Object> tool)
getContentModel
in interface org.sakaiproject.lti.api.LTIService
protected String[] getContentModelDao(Map<String,Object> tool, boolean isAdminRole)
org.sakaiproject.lti.api.LTIService#getContentModelDao(Map, java.lang.String, boolean)
protected String getContext()
public String getContentLaunch(Map<String,Object> content)
getContentLaunch
in interface org.sakaiproject.lti.api.LTIService
LTIService.getContentLaunch(java.util.Map)
public String formOutput(Object row, String fieldInfo)
formOutput
in interface org.sakaiproject.lti.api.LTIService
LTIService.formOutput(java.lang.Object,
java.lang.String)
public String formOutput(Object row, String[] fieldInfo)
formOutput
in interface org.sakaiproject.lti.api.LTIService
LTIService.formOutput(java.lang.Object,
java.lang.String[])
public String formInput(Object row, String fieldInfo)
formInput
in interface org.sakaiproject.lti.api.LTIService
LTIService.formInput(java.lang.Object,
java.lang.String)
public String formInput(Object row, String[] fieldInfo)
formInput
in interface org.sakaiproject.lti.api.LTIService
LTIService.formInput(java.lang.Object,
java.lang.String[])
public boolean isAdmin()
isAdmin
in interface org.sakaiproject.lti.api.LTIService
LTIService.isAdmin()
protected boolean isAdmin(String siteId)
public boolean isMaintain()
isMaintain
in interface org.sakaiproject.lti.api.LTIService
LTIService.isMaintain()
protected boolean isMaintain(String siteId)
public Object updateTool(Long key, Map<String,Object> newProps)
updateTool
in interface org.sakaiproject.lti.api.LTIService
public Object updateTool(Long key, Properties newProps)
updateTool
in interface org.sakaiproject.lti.api.LTIService
public Object updateToolDao(Long key, Map<String,Object> newProps, String siteId)
updateToolDao
in interface org.sakaiproject.lti.api.LTIService
org.sakaiproject.lti.impl.BaseLTIService#updateToolDao(java.lang.Long,
java.lang.Object, java.lang.String)
public abstract Object updateToolDao(Long key, Object newProps, String siteId, boolean isAdminRole, boolean isMaintainRole)
key
- newProps
- siteId
- isMaintainRole
- public Object updateContent(Long key, Map<String,Object> newProps)
updateContent
in interface org.sakaiproject.lti.api.LTIService
LTIService.updateContent(java.lang.Long, java.util.Map)
public Object updateContent(Long key, Properties newProps)
updateContent
in interface org.sakaiproject.lti.api.LTIService
LTIService.updateContent(java.lang.Long,
java.util.Properties)
public Object updateContent(Long key, Properties newProps, String siteId)
updateContent
in interface org.sakaiproject.lti.api.LTIService
key
- newProps
- siteId
- public Object updateContent(Long key, Object newProps)
key
- newProps
- public Object updateContentDao(Long key, Map<String,Object> newProps, String siteId)
updateContentDao
in interface org.sakaiproject.lti.api.LTIService
key
- newProps
- siteId
- protected abstract Object updateContentDao(Long key, Object newProps, String siteId, boolean isAdminRole, boolean isMaintainRole)
public boolean deleteContent(Long key)
deleteContent
in interface org.sakaiproject.lti.api.LTIService
protected abstract boolean deleteContentDao(Long key, String siteId, boolean isAdminRole, boolean isMaintainRole)
public static int getInt(Object o)
o
- public void filterContent(Map<String,Object> content, Map<String,Object> tool)
filterContent
in interface org.sakaiproject.lti.api.LTIService
public static Integer getCorrectProperty(String propName, Map<String,Object> content, Map<String,Object> tool)
propName
- content
- tool
- public Object insertTool(Properties newProps)
insertTool
in interface org.sakaiproject.lti.api.LTIService
public Object insertTool(Map<String,Object> newProps)
insertTool
in interface org.sakaiproject.lti.api.LTIService
public Object insertToolDao(Properties newProps, String siteId)
insertToolDao
in interface org.sakaiproject.lti.api.LTIService
protected abstract Object insertToolDao(Object newProps, String siteId, boolean isAdminRole, boolean isMaintainRole)
public boolean deleteTool(Long key)
deleteTool
in interface org.sakaiproject.lti.api.LTIService
public Map<String,Object> getTool(String url)
getTool
in interface org.sakaiproject.lti.api.LTIService
LTIService.getTool(java.lang.String)
public Map<String,Object> getTool(Long key)
getTool
in interface org.sakaiproject.lti.api.LTIService
public Map<String,Object> getToolDao(Long key, String siteId)
getToolDao
in interface org.sakaiproject.lti.api.LTIService
protected abstract Map<String,Object> getToolDao(Long key, String siteId, boolean isAdminRole)
public List<Map<String,Object>> getTools(String search, String order, int first, int last)
getTools
in interface org.sakaiproject.lti.api.LTIService
public List<Map<String,Object>> getToolsDao(String search, String order, int first, int last, String siteId)
getToolsDao
in interface org.sakaiproject.lti.api.LTIService
protected abstract List<Map<String,Object>> getToolsDao(String search, String order, int first, int last, String siteId, boolean isAdminRole)
public Object insertContent(Properties newProps)
insertContent
in interface org.sakaiproject.lti.api.LTIService
public Object insertContentDao(Properties newProps, String siteId)
insertContentDao
in interface org.sakaiproject.lti.api.LTIService
protected abstract Object insertContentDao(Properties newProps, String siteId, boolean isAdminRole, boolean isMaintainRole)
public Map<String,Object> getContent(Long key)
getContent
in interface org.sakaiproject.lti.api.LTIService
public Map<String,Object> getContent(Long key, String siteId)
getContent
in interface org.sakaiproject.lti.api.LTIService
public Map<String,Object> getContentDao(Long key)
getContentDao
in interface org.sakaiproject.lti.api.LTIService
public Map<String,Object> getContentDao(Long key, String siteId)
getContentDao
in interface org.sakaiproject.lti.api.LTIService
protected abstract Map<String,Object> getContentDao(Long key, String siteId, boolean isAdminRole)
public List<Map<String,Object>> getContents(String search, String order, int first, int last)
getContents
in interface org.sakaiproject.lti.api.LTIService
public List<Map<String,Object>> getContentsDao(String search, String order, int first, int last, String siteId)
protected abstract List<Map<String,Object>> getContentsDao(String search, String order, int first, int last, String siteId, boolean isAdminRole)
public Object insertToolContent(String id, String toolId, Properties reqProps)
insertToolContent
in interface org.sakaiproject.lti.api.LTIService
public Object insertToolContent(String id, String toolId, Properties reqProps, String siteId)
insertToolContent
in interface org.sakaiproject.lti.api.LTIService
protected Object insertToolContentDao(String id, String toolId, Properties reqProps, String siteId, boolean isAdminRole, boolean isMaintainRole)
public Object insertToolSiteLink(String id, String button_text)
insertToolSiteLink
in interface org.sakaiproject.lti.api.LTIService
public Object insertToolSiteLink(String id, String button_text, String siteId)
insertToolSiteLink
in interface org.sakaiproject.lti.api.LTIService
protected Object insertToolSiteLinkDao(String id, String button_text, String siteId, boolean isAdminRole, boolean isMaintainRole)
public String deleteContentLink(Long key)
deleteContentLink
in interface org.sakaiproject.lti.api.LTIService
protected String deleteContentLinkDao(Long key, String siteId, boolean isAdminRole, boolean isMaintainRole)
public String[] getDeployModel()
getDeployModel
in interface org.sakaiproject.lti.api.LTIService
protected abstract Object insertDeployDao(Properties newProps, String siteId, boolean isAdminRole, boolean isMaintainRole)
public Object insertDeployDao(Properties newProps)
insertDeployDao
in interface org.sakaiproject.lti.api.LTIService
protected abstract Object updateDeployDao(Long key, Object newProps, String siteId, boolean isAdminRole, boolean isMaintainRole)
public Object updateDeployDao(Long key, Object newProps)
updateDeployDao
in interface org.sakaiproject.lti.api.LTIService
public boolean deleteDeployDao(Long key)
deleteDeployDao
in interface org.sakaiproject.lti.api.LTIService
protected abstract Map<String,Object> getDeployDao(Long key, String siteId, boolean isAdminRole)
public Map<String,Object> getDeployDao(Long key)
getDeployDao
in interface org.sakaiproject.lti.api.LTIService
public List<Map<String,Object>> getDeploysDao(String search, String order, int first, int last)
getDeploysDao
in interface org.sakaiproject.lti.api.LTIService
protected abstract List<Map<String,Object>> getDeploysDao(String search, String order, int first, int last, String siteId, boolean isAdminRole)
public abstract Object insertProxyBindingDao(Properties newProps)
insertProxyBindingDao
in interface org.sakaiproject.lti.api.LTIService
public abstract Object updateProxyBindingDao(Long key, Object newProps)
updateProxyBindingDao
in interface org.sakaiproject.lti.api.LTIService
public abstract boolean deleteProxyBindingDao(Long key)
deleteProxyBindingDao
in interface org.sakaiproject.lti.api.LTIService
public abstract Map<String,Object> getProxyBindingDao(Long key)
getProxyBindingDao
in interface org.sakaiproject.lti.api.LTIService
Copyright © 2009-2015 Sakai Project. All Rights Reserved.