|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object blackboard.platform.plugin.PlugInUtil
public class PlugInUtil
The PlugInUtil
class is a utility class for
plug-ins for the Blackboard application.
Field Summary | |
---|---|
static CourseMembership.Role[] |
CONTENT_COURSE_ALLOWED_ROLES
Allowed user roles for editing course content |
static User.SystemRole[] |
CONTENT_SYS_ALLOWED_ROLES
Allowed system roles for editing course content |
static User.SystemRole[] |
INSTALL_SYS_ALLOWED_ROLES
|
Constructor Summary | |
---|---|
PlugInUtil()
|
Method Summary | |
---|---|
static boolean |
authorizeForCourse(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Authorizes the user's system and course roles for entering the Course. |
static boolean |
authorizeForCourseControlPanel(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Authorizes the user's system and course roles for using the Instructor Control Panel. |
static boolean |
authorizeForCourseControlPanelContent(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Authorizes the user's system and course roles for modifying content from the Instructor Control Panel. |
static boolean |
authorizeForSystemAdmin(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Authorizes the user's system role for the Administrator Control panel. |
static java.io.File |
getConfigDirectory(java.lang.String vid,
java.lang.String handle)
Returns the configuration directory for installing plug-ins. |
static Id |
getCourseId(javax.servlet.http.HttpServletRequest request)
Returns the CourseId given an HttpServletRequest object |
static java.lang.String |
getDisplayContentReturnURL(Id contentId)
Deprecated. use getDisplayContentReturnURL(contentId, courseId) |
static java.lang.String |
getDisplayContentReturnURL(Id contentId,
Id courseId)
Returns the return URL for jsps going back to the Editable Content page. |
static java.lang.String |
getDisplayContentReturnURL(java.lang.String contentId)
Deprecated. use getDisplayContentReturnURL(contentId, courseId) |
static java.lang.String |
getDisplayContentReturnURL(java.lang.String contentId,
java.lang.String courseId)
Returns the return URL for jsps going back to the Display Content page. |
static java.lang.String |
getEditableContentReturnURL(Id contentId)
Deprecated. use getEditableContentReturnURL(contentId,courseId) |
static java.lang.String |
getEditableContentReturnURL(Id contentId,
Id courseId)
Returns the return URL for jsps going back to the Editable Content page. |
static java.lang.String |
getEditableContentReturnURL(java.lang.String contentId)
Deprecated. use getEditableContentReturnURL(contentId, courseId) |
static java.lang.String |
getEditableContentReturnURL(java.lang.String contentId,
java.lang.String courseId)
Returns the return URL for jsps going back to the Editable Content page. |
static java.lang.String |
getNavItemHandle(CourseDocument courseDoc)
Deprecated. |
static java.lang.String |
getToolType(NavigationItem item)
Returns a human readable name for specific navitem family identifiers. |
static java.lang.String |
getUri(PlugIn pin,
java.lang.String path)
Returns the a URI generated for this plugin and the specified resource. |
static java.lang.String |
getUri(java.lang.String vid,
java.lang.String handle,
java.lang.String path)
Returns the a URI generated for this plugin and the specified resource. |
static java.lang.String |
getUriStem(java.lang.String vid,
java.lang.String handle)
Returns the a URI-stem generated for this plugin. |
static java.lang.String |
getUriStem(java.lang.String vid,
java.lang.String handle,
VirtualInstallation vi)
Returns the a URI-stem generated for this plugin. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final User.SystemRole[] CONTENT_SYS_ALLOWED_ROLES
public static final CourseMembership.Role[] CONTENT_COURSE_ALLOWED_ROLES
public static final User.SystemRole[] INSTALL_SYS_ALLOWED_ROLES
Constructor Detail |
---|
public PlugInUtil()
Method Detail |
---|
public static java.io.File getConfigDirectory(java.lang.String vid, java.lang.String handle) throws PlugInException
vid
- String that makes up first part of the unique handle for the directoryhandle
- String that makes up second part of the unique handle for the directory
PlugInException
PlugInException
public static boolean authorizeForSystemAdmin(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws PlugInException
request
- HttpServletRequest from the jspresponse
- HttpServletResponse from the jsp
PlugInException
PlugInException
public static boolean authorizeForCourse(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws PlugInException
request
- HttpServletRequest from the jspresponse
- HttpServletResponse from the jsp
PlugInException
PlugInException
public static boolean authorizeForCourseControlPanel(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws PlugInException
request
- HttpServletRequest from the jspresponse
- HttpServletResponse from the jsp
PlugInException
PlugInException
public static boolean authorizeForCourseControlPanelContent(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws PlugInException
request
- HttpServletRequest from the jspresponse
- HttpServletResponse from the jsp
PlugInException
PlugInException
public static java.lang.String getNavItemHandle(CourseDocument courseDoc)
courseDoc
- CourseDocument
public static java.lang.String getEditableContentReturnURL(Id contentId)
contentId
- Id
public static java.lang.String getEditableContentReturnURL(Id contentId, Id courseId)
contentId
- Id
courseId
- Id
public static java.lang.String getDisplayContentReturnURL(Id contentId)
contentId
- Id
public static java.lang.String getDisplayContentReturnURL(Id contentId, Id courseId)
contentId
- Id
courseId
- Id
public static java.lang.String getEditableContentReturnURL(java.lang.String contentId)
contentId
- String
public static java.lang.String getEditableContentReturnURL(java.lang.String contentId, java.lang.String courseId)
contentId
- String
courseId
- String
that represents the primary key Id for the course to return to
public static java.lang.String getDisplayContentReturnURL(java.lang.String contentId)
contentId
- String
public static java.lang.String getDisplayContentReturnURL(java.lang.String contentId, java.lang.String courseId)
contentId
- String
courseId
- String
that represents the primary key Id for the course to return to
public static java.lang.String getUriStem(java.lang.String vid, java.lang.String handle)
PlugInUtil.getUriStem( "bb", "plugin" );
returns the string "/webapps/bb-plugin/". Using this method for URL generation in a system extension is very important, as the URIs are not guaranteed to be identical between versions of the platform.
vid
- Developer or vendor idhandle
- Developer assigned handle for the plugin
public static java.lang.String getUriStem(java.lang.String vid, java.lang.String handle, VirtualInstallation vi)
PlugInUtil.getUriStem( "bb", "plugin", vi );
returns the string "/webapps/bb-plugin-<vi.getBbUid()>/". Using this method for URL generation in a system extension is very important, as the URIs are not guaranteed to be identical between versions of the platform.
vid
- Developer or vendor idhandle
- Developer assigned handle for the pluginvi
-
public static java.lang.String getUri(PlugIn pin, java.lang.String path)
PlugInUtil.getUri( "bb", "plugin", "start.jsp" );
returns the string "/webapps/bb-plugin/start.jsp". Using this method for URL generation in a system extension is very important, as the URIs are not guaranteed to be identical between versions of the platform.
pin
- Pluginpath
- Resource to retrieve. This may be any resource in the web application space.
public static java.lang.String getUri(java.lang.String vid, java.lang.String handle, java.lang.String path)
PlugInUtil.getUri( "bb", "plugin", "start.jsp" );
returns the string "/webapps/bb-plugin/start.jsp". Using this method for URL generation in a system extension is very important, as the URIs are not guaranteed to be identical between versions of the platform.
vid
- Plugin vendor idhandle
- Developer assigned handle for the plug inpath
- Resource to retrieve. This may be any resource in the web application space.
public static Id getCourseId(javax.servlet.http.HttpServletRequest request)
request
- HttpServletRequest from the session
Id
objectpublic static java.lang.String getToolType(NavigationItem item)
item
- Navigation item to detect type
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |