本文整理汇总了Java中org.sakaiproject.component.cover.ServerConfigurationService.getToolUrl方法的典型用法代码示例。如果您正苦于以下问题:Java ServerConfigurationService.getToolUrl方法的具体用法?Java ServerConfigurationService.getToolUrl怎么用?Java ServerConfigurationService.getToolUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.sakaiproject.component.cover.ServerConfigurationService
的用法示例。
在下文中一共展示了ServerConfigurationService.getToolUrl方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: editItemUrl
import org.sakaiproject.component.cover.ServerConfigurationService; //导入方法依赖的package包/类
public String editItemUrl(SimplePageBean bean) {
String tool = bean.getCurrentTool("sakai.samigo");
if (tool == null)
return null;
if (false) {
// code to verify that exportObject actually works
if (assessment == null)
assessment = getPublishedAssessment(id);
String aid = assessment.getAssessmentId().toString();
Document doc = exportObject(aid);
log.info("foo " + doc.getElementsByTagName("questestinterop"));
}
if (samigo_linked)
return ServerConfigurationService.getToolUrl() + "/" + tool + "/jsf/author/editLink?publishedAssessmentId=" + id;
else
return ServerConfigurationService.getToolUrl() + "/" + tool + "/jsf/index/mainIndex";
}
示例2: getToolBaseUrl
import org.sakaiproject.component.cover.ServerConfigurationService; //导入方法依赖的package包/类
/**
* Get the base URL for tools not including the ToolId
*
* @param <code>req</code>
* The request object. If you have no access to the request object,
* you can leave this null and we will try to pull the request
* from ThreadLocal - if we fail it is a RunTime exception.
* @return Returns true for JSR_168 portlets
*/
public static String getToolBaseUrl(HttpServletRequest req)
{
if ( req == null ) req = getRequestFromThreadLocal();
String retval = ServerConfigurationService.getToolUrl();
if ( isInlineRequest(req) ) {
String currentSiteId = ToolManager.getCurrentPlacement().getContext();
retval = retval.replaceAll("tool$","site/"+currentSiteId+"/tool");
}
return retval;
}
示例3: getUrl
import org.sakaiproject.component.cover.ServerConfigurationService; //导入方法依赖的package包/类
public String getUrl() {
if (simplePageBean != null) {
return ServerConfigurationService.getToolUrl() + "/" + simplePageBean.getCurrentTool("sakai.assignment2") +
"/student-submit/" + id;
}
Site site = null;
try {
site = SiteService.getSite(ToolManager.getCurrentPlacement().getContext());
} catch (Exception impossible) {
return null;
}
ToolConfiguration tool = site.getToolForCommonId("sakai.assignment2");
if(tool == null) {
return null;
}
String placement = tool.getId();
return ServerConfigurationService.getToolUrl()+ "/" + placement + "/student-submit/" + id;
// following is broken in 2.8.1
// return "/direct/assignment2/" + id;
}
示例4: createNewUrls
import org.sakaiproject.component.cover.ServerConfigurationService; //导入方法依赖的package包/类
public List<UrlItem> createNewUrls(SimplePageBean bean) {
ArrayList<UrlItem> list = new ArrayList<UrlItem>();
if (haveA2) {
String tool = bean.getCurrentTool("sakai.assignment2");
if (tool != null) {
tool = ServerConfigurationService.getToolUrl()+ "/" + tool + "/assignment";
list.add(new UrlItem(tool, messageLocator.getMessage("simplepage.create_assignment2")));
}
}
if (nextEntity != null)
list.addAll(nextEntity.createNewUrls(bean));
return list;
}
示例5: getPrintFriendlyAllAuthoredMsg
import org.sakaiproject.component.cover.ServerConfigurationService; //导入方法依赖的package包/类
public String getPrintFriendlyAllAuthoredMsg()
{
return ServerConfigurationService.getToolUrl() + Entity.SEPARATOR
+ ToolManager.getCurrentPlacement().getId() + Entity.SEPARATOR + "discussionForum"
+ Entity.SEPARATOR + "statistics" + Entity.SEPARATOR
+ "printFriendlyAllAuthoredMsg";
}
示例6: getPrintFriendlyDisplayInThread
import org.sakaiproject.component.cover.ServerConfigurationService; //导入方法依赖的package包/类
public String getPrintFriendlyDisplayInThread()
{
return ServerConfigurationService.getToolUrl() + Entity.SEPARATOR
+ ToolManager.getCurrentPlacement().getId() + Entity.SEPARATOR + "discussionForum"
+ Entity.SEPARATOR + "statistics" + Entity.SEPARATOR
+ "printFriendlyDisplayInThread";
}
示例7: editItemUrl
import org.sakaiproject.component.cover.ServerConfigurationService; //导入方法依赖的package包/类
public String editItemUrl(SimplePageBean bean) {
String tool = bean.getCurrentTool("sakai.mneme");
if (tool == null)
return null;
return ServerConfigurationService.getToolUrl()+ "/" + tool + "/assessment_edit/" + id + "/1";
}
示例8: editItemSettingsUrl
import org.sakaiproject.component.cover.ServerConfigurationService; //导入方法依赖的package包/类
public String editItemSettingsUrl(SimplePageBean bean) {
String tool = bean.getCurrentTool("sakai.mneme");
if (tool == null)
return null;
return ServerConfigurationService.getToolUrl()+ "/" + tool + "/assessment_settings/" + id + "/1";
}
示例9: getPrintFriendlyFullTextForOne
import org.sakaiproject.component.cover.ServerConfigurationService; //导入方法依赖的package包/类
public String getPrintFriendlyFullTextForOne()
{
return ServerConfigurationService.getToolUrl() + Entity.SEPARATOR
+ ToolManager.getCurrentPlacement().getId() + Entity.SEPARATOR + "discussionForum"
+ Entity.SEPARATOR + "statistics" + Entity.SEPARATOR
+ "printFriendlyFullTextForOne";
}
示例10: createNewUrls
import org.sakaiproject.component.cover.ServerConfigurationService; //导入方法依赖的package包/类
/**
* From LessonEntity
*/
public List<UrlItem> createNewUrls(SimplePageBean bean) {
ArrayList<UrlItem> list = new ArrayList<UrlItem>();
String tool = bean.getCurrentTool(TOOL_ID);
if (tool != null) {
tool = ServerConfigurationService.getToolUrl()+ "/" + tool;
list.add(new UrlItem(tool, messageLocator.getMessage("simplepage.create_yaft_topic")));
}
if (nextEntity != null)
list.addAll(nextEntity.createNewUrls(bean));
return list;
}
示例11: getPrintFriendlyUrlThread
import org.sakaiproject.component.cover.ServerConfigurationService; //导入方法依赖的package包/类
public String getPrintFriendlyUrlThread()
{
return ServerConfigurationService.getToolUrl() + Entity.SEPARATOR
+ ToolManager.getCurrentPlacement().getId() + Entity.SEPARATOR + "discussionForum"
+ Entity.SEPARATOR + "message" + Entity.SEPARATOR
+ "printFriendlyThread";
}
示例12: editItemSettingsUrl
import org.sakaiproject.component.cover.ServerConfigurationService; //导入方法依赖的package包/类
public String editItemSettingsUrl(SimplePageBean bean) {
String tool = bean.getCurrentTool("sakai.samigo");
if (tool == null)
return null;
if (samigo_linked)
return ServerConfigurationService.getToolUrl() + "/" + tool + "/jsf/author/editLink?publishedAssessmentId=" + id + "&settings=true";
else
return ServerConfigurationService.getToolUrl() + "/" + tool + "/jsf/index/mainIndex";
}
示例13: getUrl
import org.sakaiproject.component.cover.ServerConfigurationService; //导入方法依赖的package包/类
public String getUrl() {
if (url != null)
return url;
String siteId = toolManager.getCurrentPlacement().getContext();
Site site = null;
try {
site = SiteService.getSite(siteId);
} catch (Exception impossible) {
return null;
}
ToolConfiguration siteTool = site.getToolForCommonId("sakai.jforum.tool");
// LSNBLDR-21. If the tool is not in the current site we shouldn't return a url
if(siteTool == null) {
return null;
}
String prefix = null;
try {
// String toolid = "8f83cd4b-74ca-4428-0055-85ddd19a8d00";
prefix = ServerConfigurationService.getToolUrl() + "/" + siteTool.getId();
// String toolid = "8f83cd4b-74ca-4428-0055-85ddd19a8d00";
} catch (Exception e) {
log.info("tool problem " + e);
return null;
}
if (type == TYPE_JFORUM_TOPIC)
url = prefix + "/posts/list/" + id + ".page";
else if (type == TYPE_JFORUM_CATEGORY)
url = prefix + "/forums/list.page"; // no way to go directly to a category
else // forum
url = prefix + "/forums/show/" + id + ".page";
return url;
}
示例14: createNewUrls
import org.sakaiproject.component.cover.ServerConfigurationService; //导入方法依赖的package包/类
public List<UrlItem> createNewUrls(SimplePageBean bean) {
ArrayList<UrlItem> list = new ArrayList<UrlItem>();
if (haveJforum) {
String tool = bean.getCurrentTool("sakai.jforum.tool");
if (tool != null) {
tool = ServerConfigurationService.getToolUrl() + "/" + tool + "/forums/list.page";
list.add(new UrlItem(tool, messageLocator.getMessage("simplepage.create_jforum")));
}
}
if (nextEntity != null)
list.addAll(nextEntity.createNewUrls(bean));
return list;
}
示例15: getUrl
import org.sakaiproject.component.cover.ServerConfigurationService; //导入方法依赖的package包/类
public String getUrl() {
if (simplePageBean != null) {
return ServerConfigurationService.getToolUrl() + "/" + simplePageBean.getCurrentTool("sakai.assignment.grades") +
"?assignmentReference=/assignment/a/" + simplePageBean.getCurrentSiteId() + "/" + id + "&panel=Main&sakai_action=doView_submission";
}
Site site = null;
try {
site = SiteService.getSite(ToolManager.getCurrentPlacement().getContext());
} catch (Exception impossible) {
return null;
}
ToolConfiguration tool = site.getToolForCommonId("sakai.assignment.grades");
if(tool == null) {
return null;
}
String placement = tool.getId();
// https://sakai-test2.oirt.rutgers.edu/portal/tool/6b328952-cbcb-494b-0035-3c07120e4499?assignmentReference=/assignment/a/0aaae6ef-cb01-4578-0099-888d344b524b/0e52c5f6-ba73-40d2-961c-286533d59148&panel=Main&sakai_action=doView_submission
return ServerConfigurationService.getToolUrl() + "/" + placement + "?assignmentReference=/assignment/a/" + site.getId() + "/" + id + "&panel=Main&sakai_action=doView_submission";
// following was broken in 2.8.1
// return "/direct/assignment/" + id;
}