本文整理汇总了Java中org.sakaiproject.entitybroker.EntityBroker类的典型用法代码示例。如果您正苦于以下问题:Java EntityBroker类的具体用法?Java EntityBroker怎么用?Java EntityBroker使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
EntityBroker类属于org.sakaiproject.entitybroker包,在下文中一共展示了EntityBroker类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: DeveloperHelperServiceImpl
import org.sakaiproject.entitybroker.EntityBroker; //导入依赖的package包/类
/**
* Full constructor
* @param entityBroker
* @param entityBrokerManager
* @param authzGroupService
* @param functionManager
* @param securityService
* @param serverConfigurationService
* @param sessionManager
* @param siteService
* @param toolManager
* @param userDirectoryService
*/
public DeveloperHelperServiceImpl(EntityBroker entityBroker,
EntityBrokerManager entityBrokerManager,
AuthzGroupService authzGroupService,
FunctionManager functionManager, SecurityService securityService,
ServerConfigurationService serverConfigurationService, SessionManager sessionManager,
SiteService siteService, ToolManager toolManager,
UserDirectoryService userDirectoryService) {
super(entityBroker, entityBrokerManager);
this.authzGroupService = authzGroupService;
this.functionManager = functionManager;
this.securityService = securityService;
this.serverConfigurationService = serverConfigurationService;
this.sessionManager = sessionManager;
this.siteService = siteService;
this.toolManager = toolManager;
this.userDirectoryService = userDirectoryService;
}
示例2: init
import org.sakaiproject.entitybroker.EntityBroker; //导入依赖的package包/类
public void init() {
log.info("init ConnectorHelper");
siteService = (SiteService) ComponentManager.get("org.sakaiproject.site.api.SiteService");
assignmentService = (AssignmentService) ComponentManager.get("org.sakaiproject.assignment.api.AssignmentService");
authzGroupService = (AuthzGroupService) ComponentManager.get("org.sakaiproject.authz.api.AuthzGroupService");
securityService = (SecurityService) ComponentManager.get("org.sakaiproject.authz.api.SecurityService");
sites = siteService.getSites(org.sakaiproject.site.api.SiteService.SelectionType.UPDATE, null, null, null, SortType.TITLE_ASC, null);
loggedInUserId = SessionManager.getCurrentSession().getUserId();
entityBroker = (EntityBroker) ComponentManager.get(EntityBroker.class);
}
示例3: init
import org.sakaiproject.entitybroker.EntityBroker; //导入依赖的package包/类
/**
* Initialize the servlet.
*
* @param config
* The servlet config.
* @throws ServletException
*/
public void init(ServletConfig config) throws ServletException {
log.info("init()");
super.init(config);
entityBroker = (EntityBroker) ComponentManager
.get("org.sakaiproject.entitybroker.EntityBroker");
sessionManager = (SessionManager) ComponentManager
.get("org.sakaiproject.tool.api.SessionManager");
accessProviderManager = (EntityViewAccessProviderManager) ComponentManager
.get("org.sakaiproject.entitybroker.access.EntityViewAccessProviderManager");
if (accessProviderManager != null) {
accessProviderManager.registerProvider(
AssignmentEntityProvider.ENTITY_PREFIX, this);
}
}
示例4: AbstractDeveloperHelperService
import org.sakaiproject.entitybroker.EntityBroker; //导入依赖的package包/类
/**
* MINIMAL
* @param entityBroker the main EntityBroker service
* @param entityBrokerManager the main EB manager service
*/
public AbstractDeveloperHelperService(EntityBroker entityBroker,
EntityBrokerManager entityBrokerManager) {
super();
this.entityBroker = entityBroker;
this.entityBrokerManager = entityBrokerManager;
this.requestStorage = entityBrokerManager.getRequestStorage();
this.entityProperties = entityBrokerManager.getEntityPropertiesService();
}
示例5: setEntityBroker
import org.sakaiproject.entitybroker.EntityBroker; //导入依赖的package包/类
public void setEntityBroker(EntityBroker entityBroker) {
this.entityBroker = entityBroker;
}
示例6: setEntityBroker
import org.sakaiproject.entitybroker.EntityBroker; //导入依赖的package包/类
public void setEntityBroker(EntityBroker entityBroker) {
this.entityBroker = entityBroker;
}
示例7: setEntityBroker
import org.sakaiproject.entitybroker.EntityBroker; //导入依赖的package包/类
public void setEntityBroker(EntityBroker eb) {
this.entityBroker = eb;
}
示例8: setEntityBroker
import org.sakaiproject.entitybroker.EntityBroker; //导入依赖的package包/类
public void setEntityBroker(EntityBroker entityBroker) {
this.entityBroker = entityBroker;
}
示例9: setResponseHeaders
import org.sakaiproject.entitybroker.EntityBroker; //导入依赖的package包/类
/**
* Correctly sets up the basic headers for every response,
* allows setting caching to be disabled by using the nocache or no-cache param
* @param view
* @param res
* @param params
* @param headers any headers to add on
*/
protected void setResponseHeaders(EntityView view, HttpServletResponse res, Map<String, Object> params, Map<String, String> headers) {
boolean noCache = false;
long currentTime = System.currentTimeMillis();
long lastModified = currentTime;
if (params != null) {
if (params.containsKey("no-cache") || params.containsKey("nocache")) {
noCache = true;
}
String key = "last-modified";
if (params.containsKey(key)) {
try {
lastModified = ((Long) params.get(key)).longValue();
} catch (Exception e) {
// nothing to do here but use the default time
lastModified = currentTime;
}
}
}
setLastModifiedHeaders(res, null, lastModified);
// set the cache headers
res.setDateHeader(ActionReturn.Header.DATE.toString(), currentTime);
res.setDateHeader(ActionReturn.Header.EXPIRES.toString(), currentTime + 600000);
if (noCache) {
res.setHeader(ActionReturn.Header.CACHE_CONTROL.toString(), "must-revalidate");
res.addHeader(ActionReturn.Header.CACHE_CONTROL.toString(), "private");
res.addHeader(ActionReturn.Header.CACHE_CONTROL.toString(), "no-store");
res.setDateHeader(ActionReturn.Header.EXPIRES.toString(), currentTime + 1000);
res.addHeader(ActionReturn.Header.CACHE_CONTROL.toString(), "max-age=0");
res.addHeader(ActionReturn.Header.CACHE_CONTROL.toString(), "s-maxage=0");
} else {
// response.addHeader("Cache-Control", "must-revalidate");
res.setHeader(ActionReturn.Header.CACHE_CONTROL.toString(), "public");
res.addHeader(ActionReturn.Header.CACHE_CONTROL.toString(), "max-age=600");
res.addHeader(ActionReturn.Header.CACHE_CONTROL.toString(), "s-maxage=600");
}
// set the EB specific headers
String prefix = view.getEntityReference().getPrefix();
EntityProvider provider = entityProviderManager.getProviderByPrefix(prefix);
res.setHeader("x-entity-prefix", prefix);
res.setHeader("x-entity-reference", view.getEntityReference().toString());
res.setHeader("x-entity-url", view.getEntityURL());
res.setHeader("x-entity-format", view.getFormat());
// set Sakai sdata compliant headers
res.setHeader("x-sdata-handler", provider == null ? EntityBroker.class.getName() : provider.getClass().getName());
res.setHeader("x-sdata-url", view.getOriginalEntityUrl());
// add in any extra headers last
addResponseHeaders(res, headers);
}
示例10: getEntityBroker
import org.sakaiproject.entitybroker.EntityBroker; //导入依赖的package包/类
public EntityBroker getEntityBroker() {
return entityBroker;
}
示例11: setEntityBroker
import org.sakaiproject.entitybroker.EntityBroker; //导入依赖的package包/类
public void setEntityBroker(EntityBroker entityBroker) {
this.entityBroker = entityBroker;
}