• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java AdminPermission类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: setUp

import org.osgi.framework.AdminPermission; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
    List<Permission> permSet = Lists.newArrayList();
    permSet.add(new PackagePermission("*", PackagePermission.EXPORTONLY));
    permSet.add(new PackagePermission("*", PackagePermission.IMPORT));
    permSet.add(new AdaptPermission("*", AdaptPermission.ADAPT));
    permSet.add(new ConfigurationPermission("*", ConfigurationPermission.CONFIGURE));
    permSet.add(new AdminPermission("*", AdminPermission.METADATA));
    defaultPermissions = permSet;

    List<Permission> adminPermSet = Lists.newArrayList();
    adminPermSet.add(new ServicePermission(ApplicationAdminService.class.getName(), ServicePermission.GET));
    adminServicePermissions = adminPermSet;

    testPermission = new org.onosproject.security.Permission("testClass", "APP_READ", "testActions");
    testPermissions = new HashSet<org.onosproject.security.Permission>();
    testPermissions.add(testPermission);

    testJavaPerm = new AppPermission("testName");
    testJavaPerms = new HashSet<Permission>();
    testJavaPerms.add(testJavaPerm);
}
 
开发者ID:opennetworkinglab,项目名称:onos,代码行数:23,代码来源:DefaultPolicyBuilderTest.java


示例2: getTestPermissions

import org.osgi.framework.AdminPermission; //导入依赖的package包/类
protected List getTestPermissions() {
	List list = super.getTestPermissions();
	list.add(new FilePermission("<<ALL FILES>>", "read"));
	list.add(new AdminPermission("*", AdminPermission.EXECUTE));
	list.add(new AdminPermission("*", AdminPermission.LIFECYCLE));
	list.add(new AdminPermission("*", AdminPermission.RESOLVE));
	list.add(new AdminPermission("*", AdminPermission.METADATA));
	return list;
}
 
开发者ID:eclipse,项目名称:gemini.blueprint,代码行数:10,代码来源:DuplicateClassTest.java


示例3: getTestPermissions

import org.osgi.framework.AdminPermission; //导入依赖的package包/类
protected List<Permission> getTestPermissions() {
	List<Permission> list = super.getTestPermissions();
	list.add(new AdminPermission("*", AdminPermission.METADATA));
	list.add(new AdminPermission("*", AdminPermission.LISTENER));
	list.add(new AdminPermission("*", AdminPermission.EXECUTE));
	list.add(new AdminPermission("*", AdminPermission.RESOURCE));
	return list;
}
 
开发者ID:eclipse,项目名称:gemini.blueprint,代码行数:9,代码来源:CallingResourceOnDifferentBundlesTest.java


示例4: getTestPermissions

import org.osgi.framework.AdminPermission; //导入依赖的package包/类
protected List getTestPermissions() {
	List perms = super.getTestPermissions();
	// export package
	perms.add(new AdminPermission("*", AdminPermission.LIFECYCLE));
	perms.add(new AdminPermission("*", AdminPermission.RESOLVE));
	return perms;
}
 
开发者ID:eclipse,项目名称:gemini.blueprint,代码行数:8,代码来源:ProxyCreatorTest.java


示例5: getTestPermissions

import org.osgi.framework.AdminPermission; //导入依赖的package包/类
protected List getTestPermissions() {
	List perms = super.getTestPermissions();
	// export package
	perms.add(new AdminPermission("*", AdminPermission.EXECUTE));
	perms.add(new AdminPermission("*", AdminPermission.LIFECYCLE));
	perms.add(new AdminPermission("*", AdminPermission.RESOLVE));
	perms.add(new FilePermission("<<ALL FILES>>", "read"));
	return perms;
}
 
开发者ID:eclipse,项目名称:gemini.blueprint,代码行数:10,代码来源:ExtenderTest.java


示例6: getTestPermissions

import org.osgi.framework.AdminPermission; //导入依赖的package包/类
protected List getTestPermissions() {
	List perms = super.getTestPermissions();
	// export package
	perms.add(new FilePermission("<<ALL FILES>>", "read"));
	perms.add(new AdminPermission("*", AdminPermission.LIFECYCLE));
	perms.add(new AdminPermission("*", AdminPermission.EXECUTE));
	perms.add(new AdminPermission("*", AdminPermission.RESOLVE));
	return perms;
}
 
开发者ID:eclipse,项目名称:gemini.blueprint,代码行数:10,代码来源:MavenArtifactLookupTest.java


示例7: getTestPermissions

import org.osgi.framework.AdminPermission; //导入依赖的package包/类
protected List getTestPermissions() {
	List perms = super.getTestPermissions();
	// export package
	perms.add(new AdminPermission("*", AdminPermission.EXECUTE));
	perms.add(new PropertyPermission("*", "write"));
	perms.add(new PropertyPermission("*", "read"));
	perms.add(new FilePermission("<<ALL FILES>>", "read"));
	perms.add(new FilePermission("<<ALL FILES>>", "delete"));
	perms.add(new FilePermission("<<ALL FILES>>", "write"));
	perms.add(new ConfigurationPermission("*", ConfigurationPermission.CONFIGURE));
	return perms;
}
 
开发者ID:eclipse,项目名称:gemini.blueprint,代码行数:13,代码来源:PropertyPlaceholderTest.java


示例8: getTestPermissions

import org.osgi.framework.AdminPermission; //导入依赖的package包/类
/**
 * Since the test is creating some application contexts, give it some
 * privileges.
 */
protected List getTestPermissions() {
	List perms = super.getTestPermissions();
	perms.add(new AdminPermission("(name=org.eclipse.gemini.blueprint.iandt.scope.a)", "*"));
	perms.add(new AllPermission());
	return perms;
}
 
开发者ID:eclipse,项目名称:gemini.blueprint,代码行数:11,代码来源:ScopingTest.java


示例9: getTestPermissions

import org.osgi.framework.AdminPermission; //导入依赖的package包/类
protected List getTestPermissions() {
	List list = super.getTestPermissions();
	list.add(new FilePermission("<<ALL FILES>>", "read"));
	list.add(new AdminPermission("*", AdminPermission.LIFECYCLE));
	list.add(new AdminPermission("*", AdminPermission.EXECUTE));
	list.add(new AdminPermission("*", AdminPermission.RESOLVE));
	return list;
}
 
开发者ID:eclipse,项目名称:gemini.blueprint,代码行数:9,代码来源:DeadlockHandlingTest.java


示例10: getTestPermissions

import org.osgi.framework.AdminPermission; //导入依赖的package包/类
protected List getTestPermissions() {
	List perms = super.getTestPermissions();
	perms.add(new FilePermission("<<ALL FILES>>", "read"));
	perms.add(new AdminPermission("*", AdminPermission.EXECUTE));
	perms.add(new AdminPermission("*", AdminPermission.LIFECYCLE));
	perms.add(new AdminPermission("*", AdminPermission.RESOLVE));
	perms.add(new PropertyPermission("*", "read"));
	perms.add(new PropertyPermission("*", "write"));
	return perms;
}
 
开发者ID:eclipse,项目名称:gemini.blueprint,代码行数:11,代码来源:Cardinality0to1Test.java


示例11: getTestPermissions

import org.osgi.framework.AdminPermission; //导入依赖的package包/类
protected List getTestPermissions() {
	List perms = super.getTestPermissions();
	// export package
	perms.add(new PropertyPermission("*", AdminPermission.EXECUTE));
	perms.add(new FilePermission("<<ALL FILES>>", "read"));
	return perms;
}
 
开发者ID:eclipse,项目名称:gemini.blueprint,代码行数:8,代码来源:DependencyTest.java


示例12: getTestPermissions

import org.osgi.framework.AdminPermission; //导入依赖的package包/类
protected List getTestPermissions() {
	List list = super.getTestPermissions();
	list.add(new FilePermission("<<ALL FILES>>", "read"));
	list.add(new AdminPermission("*", AdminPermission.LIFECYCLE));
	list.add(new AdminPermission("*", AdminPermission.EXECUTE));
	list.add(new AdminPermission("*", AdminPermission.RESOLVE));
	list.add(new AdminPermission("*", AdminPermission.METADATA));
	return list;
}
 
开发者ID:eclipse,项目名称:gemini.blueprint,代码行数:10,代码来源:FactoryDependencyTest.java


示例13: getTestPermissions

import org.osgi.framework.AdminPermission; //导入依赖的package包/类
protected List getTestPermissions() {
	List perms = super.getTestPermissions();
	perms.add(new FilePermission("<<ALL FILES>>", "read"));
	perms.add(new AdminPermission("*", AdminPermission.EXECUTE));
	perms.add(new AdminPermission("*", AdminPermission.LIFECYCLE));
	perms.add(new AdminPermission("*", AdminPermission.RESOLVE));
	perms.add(new AdminPermission("*", AdminPermission.METADATA));
	return perms;
}
 
开发者ID:eclipse,项目名称:gemini.blueprint,代码行数:10,代码来源:DependencyTest.java


示例14: getTestPermissions

import org.osgi.framework.AdminPermission; //导入依赖的package包/类
protected List getTestPermissions() {
	List perms = super.getTestPermissions();
	// export package
	perms.add(new AdminPermission("*", AdminPermission.EXECUTE));
	perms.add(new AdminPermission("*", AdminPermission.LIFECYCLE));
	return perms;
}
 
开发者ID:eclipse,项目名称:gemini.blueprint,代码行数:8,代码来源:ProxyDestructionTest.java


示例15: getTestPermissions

import org.osgi.framework.AdminPermission; //导入依赖的package包/类
protected List getTestPermissions() {
	List list = super.getTestPermissions();
	list.add(new FilePermission("<<ALL FILES>>", "read"));
	// log files
	list.add(new FilePermission("<<ALL FILES>>", "delete"));
	list.add(new FilePermission("<<ALL FILES>>", "write"));
	list.add(new AdminPermission("*", AdminPermission.LISTENER));
	list.add(new AdminPermission("(name=" + FRAGMENT_1 + ")", AdminPermission.RESOURCE));
	list.add(new AdminPermission("(name=" + FRAGMENT_2 + ")", AdminPermission.RESOURCE));
	return list;
}
 
开发者ID:eclipse,项目名称:gemini.blueprint,代码行数:12,代码来源:BaseIoTest.java


示例16: getDefaultPerms

import org.osgi.framework.AdminPermission; //导入依赖的package包/类
public static List<Permission> getDefaultPerms() {
    List<Permission> permSet = Lists.newArrayList();
    permSet.add(new PackagePermission("*", PackagePermission.EXPORTONLY));
    permSet.add(new PackagePermission("*", PackagePermission.IMPORT));
    permSet.add(new AdaptPermission("*", AdaptPermission.ADAPT));
    permSet.add(new ConfigurationPermission("*", ConfigurationPermission.CONFIGURE));
    permSet.add(new AdminPermission("*", AdminPermission.METADATA));
    return permSet;
}
 
开发者ID:shlee89,项目名称:athena,代码行数:10,代码来源:DefaultPolicyBuilder.java


示例17: testGetDefaultPerms

import org.osgi.framework.AdminPermission; //导入依赖的package包/类
@Test
public void testGetDefaultPerms() {
    List<Permission> permSet = Lists.newArrayList();
    assertTrue(permSet.isEmpty());
    permSet.add(new PackagePermission("*", PackagePermission.EXPORTONLY));
    permSet.add(new PackagePermission("*", PackagePermission.IMPORT));
    permSet.add(new AdaptPermission("*", AdaptPermission.ADAPT));
    permSet.add(new ConfigurationPermission("*", ConfigurationPermission.CONFIGURE));
    permSet.add(new AdminPermission("*", AdminPermission.METADATA));
    assertEquals(5, permSet.size());
}
 
开发者ID:opennetworkinglab,项目名称:onos,代码行数:12,代码来源:DefaultPolicyBuilderTest.java


示例18: getTestPermissions

import org.osgi.framework.AdminPermission; //导入依赖的package包/类
protected List getTestPermissions() {
	List list = super.getTestPermissions();
	list.add(new AdminPermission("*", AdminPermission.METADATA));
	list.add(new AdminPermission("*", AdminPermission.LISTENER));
	list.add(new AdminPermission("*", AdminPermission.EXECUTE));
	list.add(new AdminPermission("*", AdminPermission.RESOURCE));
	return list;
}
 
开发者ID:BeamFoundry,项目名称:spring-osgi,代码行数:9,代码来源:CallingResourceOnDifferentBundlesTest.java


示例19: getTestPermissions

import org.osgi.framework.AdminPermission; //导入依赖的package包/类
/**
 * Since the test is creating some application contexts, give it some
 * privileges.
 */
protected List getTestPermissions() {
	List perms = super.getTestPermissions();
	perms.add(new AdminPermission("(name=org.springframework.osgi.iandt.scope.a)", AdminPermission.RESOURCE));
	perms.add(new AdminPermission("(name=org.springframework.osgi.iandt.scope.a)", AdminPermission.METADATA));
	perms.add(new AdminPermission("(name=org.springframework.osgi.iandt.scope.a)", AdminPermission.CLASS));
	return perms;
}
 
开发者ID:BeamFoundry,项目名称:spring-osgi,代码行数:12,代码来源:ScopingTest.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Frustrum类代码示例发布时间:2022-05-23
下一篇:
Java CheckedException类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap