Java 类org.osgi.framework.AdminPermission 实例源码

项目:onos    文件:DefaultPolicyBuilderTest.java   
@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);
}
项目:gemini.blueprint    文件:DuplicateClassTest.java   
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;
}
项目:gemini.blueprint    文件:CallingResourceOnDifferentBundlesTest.java   
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;
}
项目:gemini.blueprint    文件:ProxyCreatorTest.java   
protected List getTestPermissions() {
    List perms = super.getTestPermissions();
    // export package
    perms.add(new AdminPermission("*", AdminPermission.LIFECYCLE));
    perms.add(new AdminPermission("*", AdminPermission.RESOLVE));
    return perms;
}
项目:gemini.blueprint    文件:ExtenderTest.java   
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;
}
项目:gemini.blueprint    文件:ExtenderVersionTest.java   
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;
}
项目:gemini.blueprint    文件:MavenArtifactLookupTest.java   
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;
}
项目:gemini.blueprint    文件:PropertyPlaceholderTest.java   
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;
}
项目:gemini.blueprint    文件:ScopingTest.java   
/**
 * 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;
}
项目:gemini.blueprint    文件:DeadlockHandlingTest.java   
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;
}
项目:gemini.blueprint    文件:Cardinality0to1Test.java   
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;
}
项目:gemini.blueprint    文件:OsgiLifecycleNotificationTest.java   
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;
}
项目:gemini.blueprint    文件:BehaviorBaseTest.java   
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;
}
项目:gemini.blueprint    文件:ErrorHandlingTest.java   
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;
}
项目:gemini.blueprint    文件:DependencyTest.java   
protected List getTestPermissions() {
    List perms = super.getTestPermissions();
    // export package
    perms.add(new PropertyPermission("*", AdminPermission.EXECUTE));
    perms.add(new FilePermission("<<ALL FILES>>", "read"));
    return perms;
}
项目:gemini.blueprint    文件:FactoryDependencyTest.java   
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;
}
项目:gemini.blueprint    文件:DependencyTest.java   
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;
}
项目:gemini.blueprint    文件:ProxyDestructionTest.java   
protected List getTestPermissions() {
    List perms = super.getTestPermissions();
    // export package
    perms.add(new AdminPermission("*", AdminPermission.EXECUTE));
    perms.add(new AdminPermission("*", AdminPermission.LIFECYCLE));
    return perms;
}
项目:gemini.blueprint    文件:ReferenceProxyTest.java   
protected List getTestPermissions() {
    List perms = super.getTestPermissions();
    // export package
    perms.add(new AdminPermission("*", AdminPermission.EXECUTE));
    perms.add(new AdminPermission("*", AdminPermission.LIFECYCLE));
    return perms;
}
项目:gemini.blueprint    文件:BaseIoTest.java   
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;
}
项目:athena    文件:DefaultPolicyBuilder.java   
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;
}
项目:onos    文件:DefaultPolicyBuilder.java   
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;
}
项目:onos    文件:DefaultPolicyBuilderTest.java   
@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());
}
项目:spring-osgi    文件:DuplicateClassTest.java   
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;
}
项目:spring-osgi    文件:CallingResourceOnDifferentBundlesTest.java   
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;
}
项目:spring-osgi    文件:ProxyCreatorTest.java   
protected List getTestPermissions() {
    List perms = super.getTestPermissions();
    // export package
    perms.add(new AdminPermission("*", AdminPermission.LIFECYCLE));
    perms.add(new AdminPermission("*", AdminPermission.RESOLVE));
    return perms;
}
项目:spring-osgi    文件:ExtenderTest.java   
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;
}
项目:spring-osgi    文件:ExtenderVersionTest.java   
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;
}
项目:spring-osgi    文件:MavenArtifactLookupTest.java   
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;
}
项目:spring-osgi    文件:PropertyPlaceholderTest.java   
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;
}
项目:spring-osgi    文件:ScopingTest.java   
/**
 * 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;
}
项目:spring-osgi    文件:DeadlockHandlingTest.java   
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;
}
项目:spring-osgi    文件:Cardinality0to1Test.java   
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;
}
项目:spring-osgi    文件:OsgiLifecycleNotificationTest.java   
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;
}
项目:spring-osgi    文件:BehaviorBaseTest.java   
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;
}
项目:spring-osgi    文件:ErrorHandlingTest.java   
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;
}
项目:spring-osgi    文件:DependencyTest.java   
protected List getTestPermissions() {
    List perms = super.getTestPermissions();
    // export package
    perms.add(new PropertyPermission("*", AdminPermission.EXECUTE));
    perms.add(new FilePermission("<<ALL FILES>>", "read"));
    return perms;
}
项目:spring-osgi    文件:FactoryDependencyTest.java   
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;
}
项目:spring-osgi    文件:DependencyTest.java   
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;
}
项目:spring-osgi    文件:ProxyDestructionTest.java   
protected List getTestPermissions() {
    List perms = super.getTestPermissions();
    // export package
    perms.add(new AdminPermission("*", AdminPermission.EXECUTE));
    perms.add(new AdminPermission("*", AdminPermission.LIFECYCLE));
    return perms;
}