本文整理汇总了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));
}
示例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;
}
示例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);
}