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


Java Resolvable类代码示例

本文整理汇总了Java中org.sakaiproject.entitybroker.entityprovider.capabilities.Resolvable的典型用法代码示例。如果您正苦于以下问题:Java Resolvable类的具体用法?Java Resolvable怎么用?Java Resolvable使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Resolvable类属于org.sakaiproject.entitybroker.entityprovider.capabilities包,在下文中一共展示了Resolvable类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testGetPrefixCapabilities

import org.sakaiproject.entitybroker.entityprovider.capabilities.Resolvable; //导入依赖的package包/类
@Test
public void testGetPrefixCapabilities() {
   List<Class<? extends EntityProvider>> caps = null;

   caps = entityProviderManager.getPrefixCapabilities(TestData.PREFIX1);
   Assert.assertNotNull(caps);
   Assert.assertEquals(4, caps.size());
   Assert.assertTrue(caps.contains(EntityProvider.class));
   Assert.assertTrue(caps.contains(CoreEntityProvider.class));
   Assert.assertTrue(caps.contains(Taggable.class));
   Assert.assertTrue(caps.contains(TagProvideable.class));

   caps = entityProviderManager.getPrefixCapabilities(TestData.PREFIX4);
   Assert.assertNotNull(caps);
   Assert.assertEquals(5, caps.size());
   Assert.assertTrue(caps.contains(EntityProvider.class));
   Assert.assertTrue(caps.contains(CoreEntityProvider.class));
   Assert.assertTrue(caps.contains(Resolvable.class));
   Assert.assertTrue(caps.contains(CollectionResolvable.class));
   Assert.assertTrue(caps.contains(Outputable.class));

}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:23,代码来源:EntityProviderManagerImplTest.java

示例2: fetchEntityObject

import org.sakaiproject.entitybroker.entityprovider.capabilities.Resolvable; //导入依赖的package包/类
/**
 * Get the entity without a change (may be EntityData or just an object)
 */
protected Object fetchEntityObject(EntityReference ref) {
    Object entity = null;
    Resolvable provider = entityProviderManager.getProviderByPrefixAndCapability(ref.getPrefix(), Resolvable.class);
    if (provider != null) {
        entity = provider.getEntity(ref);
    }
    return entity;
}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:12,代码来源:EntityBrokerManagerImpl.java

示例3: testGetProviderByPrefixAndCapability

import org.sakaiproject.entitybroker.entityprovider.capabilities.Resolvable; //导入依赖的package包/类
/**
 * Test method for
 * {@link org.sakaiproject.entitybroker.impl.entityprovider.EntityProviderManagerImpl#getProviderByPrefixAndCapability(java.lang.String, java.lang.Class)}.
 */
@Test
public void testGetProviderByPrefixAndCapability() {
   EntityProvider ep = null;

   // get valid providers
   ep = entityProviderManager.getProviderByPrefixAndCapability(TestData.PREFIX1,
         CoreEntityProvider.class);
   Assert.assertNotNull(ep);
   Assert.assertEquals(td.entityProvider1, ep);

   // get valid providers for sub caps
   ep = entityProviderManager.getProviderByPrefixAndCapability(TestData.PREFIX1, Taggable.class);
   Assert.assertNotNull(ep);
   Assert.assertEquals(td.entityProvider1T, ep);

   ep = entityProviderManager.getProviderByPrefixAndCapability(TestData.PREFIX4,
         Resolvable.class);
   Assert.assertNotNull(ep);
   Assert.assertEquals(td.entityProvider4, ep);

   // attempt to get providers when there are none
   ep = entityProviderManager.getProviderByPrefixAndCapability(TestData.PREFIX2,
         CoreEntityProvider.class);
   Assert.assertNull(ep);

   ep = entityProviderManager.getProviderByPrefixAndCapability(TestData.PREFIX1,
         Resolvable.class);
   Assert.assertNull(ep);
}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:34,代码来源:EntityProviderManagerImplTest.java


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