当前位置: 首页>>代码示例>>Java>>正文


Java EntityBroker类代码示例

本文整理汇总了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;
}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:31,代码来源:DeveloperHelperServiceImpl.java

示例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);
}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:12,代码来源:ConnectorHelper.java

示例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);
	}
}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:22,代码来源:RedirectingAssignmentEntityServlet.java

示例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();
}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:14,代码来源:AbstractDeveloperHelperService.java

示例5: setEntityBroker

import org.sakaiproject.entitybroker.EntityBroker; //导入依赖的package包/类
public void setEntityBroker(EntityBroker entityBroker) {
    this.entityBroker = entityBroker;
}
 
开发者ID:sakaicontrib,项目名称:blogwow,代码行数:4,代码来源:BlogGroupEntityProviderImpl.java

示例6: setEntityBroker

import org.sakaiproject.entitybroker.EntityBroker; //导入依赖的package包/类
public void setEntityBroker(EntityBroker entityBroker) {
   this.entityBroker = entityBroker;
}
 
开发者ID:sakaicontrib,项目名称:blogwow,代码行数:4,代码来源:ExternalLogicImpl.java

示例7: setEntityBroker

import org.sakaiproject.entitybroker.EntityBroker; //导入依赖的package包/类
public void setEntityBroker(EntityBroker eb) {
	this.entityBroker = eb;
}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:4,代码来源:MessageForumsEntityContentProducer.java

示例8: setEntityBroker

import org.sakaiproject.entitybroker.EntityBroker; //导入依赖的package包/类
public void setEntityBroker(EntityBroker entityBroker) {
 this.entityBroker = entityBroker;
}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:4,代码来源:DiscussionForumManagerImpl.java

示例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);
}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:62,代码来源:EntityHandlerImpl.java

示例10: getEntityBroker

import org.sakaiproject.entitybroker.EntityBroker; //导入依赖的package包/类
public EntityBroker getEntityBroker() {
    return entityBroker;
}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:4,代码来源:EntityBrokerCoreServiceManager.java

示例11: setEntityBroker

import org.sakaiproject.entitybroker.EntityBroker; //导入依赖的package包/类
public void setEntityBroker(EntityBroker entityBroker) {
	this.entityBroker = entityBroker;
}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:4,代码来源:AccessRegistrar.java


注:本文中的org.sakaiproject.entitybroker.EntityBroker类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。