use of joynr.infrastructure.DacTypes.MasterAccessControlEntry in project joynr by bmwcarit.
the class DomainAccessControlStoreTest method setup.
@Before
public void setup() {
// instantiate some template objects
expectedUserDomainRoleEntry = new DomainRoleEntry(UID1, new String[0], Role.OWNER);
expectedMasterAccessControlEntry = new MasterAccessControlEntry(UID1, DOMAIN1, INTERFACE1, TrustLevel.LOW, new TrustLevel[] { TrustLevel.MID, TrustLevel.LOW }, TrustLevel.LOW, new TrustLevel[] { TrustLevel.MID, TrustLevel.LOW }, OPERATION1, Permission.NO, new Permission[] { Permission.ASK, Permission.NO });
expectedOwnerAccessControlEntry = new OwnerAccessControlEntry(UID1, DOMAIN1, INTERFACE1, TrustLevel.LOW, TrustLevel.LOW, OPERATION1, Permission.NO);
}
use of joynr.infrastructure.DacTypes.MasterAccessControlEntry in project joynr by bmwcarit.
the class ProvisionedDomainAccessControlStoreTest method setup.
@Before
public void setup() throws Exception {
ObjectMapper objectMapper = new ObjectMapper();
// instantiate some template objects
expectedUserDomainRoleEntry = new DomainRoleEntry(UID1, new String[0], Role.OWNER);
DomainRoleEntry[] provisionedDomainRoles = { expectedUserDomainRoleEntry };
domainRoleEntryString = objectMapper.writeValueAsString(provisionedDomainRoles);
expectedMasterAccessControlEntry = new MasterAccessControlEntry(UID1, DOMAIN1, INTERFACE1, TrustLevel.LOW, new TrustLevel[] { TrustLevel.MID, TrustLevel.LOW }, TrustLevel.LOW, new TrustLevel[] { TrustLevel.MID, TrustLevel.LOW }, OPERATION1, Permission.NO, new Permission[] { Permission.ASK, Permission.NO });
MasterAccessControlEntry[] provisionedMasterAccessControlEntries = { expectedMasterAccessControlEntry };
masterAccessControlEntryString = objectMapper.writeValueAsString(provisionedMasterAccessControlEntries);
}
use of joynr.infrastructure.DacTypes.MasterAccessControlEntry in project joynr by bmwcarit.
the class GlobalDomainAccessStoreAdminEhCache method getAllMasterAclEntries.
@Override
public List<MasterAccessControlEntry> getAllMasterAclEntries() {
List<MasterAccessControlEntry> result = new ArrayList<MasterAccessControlEntry>();
Cache aclCache = getCache(CacheId.MASTER_ACL);
Map<Object, Element> aclMap = aclCache.getAll(aclCache.getKeys());
Iterator<Map.Entry<Object, Element>> iterator = aclMap.entrySet().iterator();
while (iterator.hasNext()) {
Map.Entry<Object, Element> thisMapEntry = iterator.next();
Element thisElement = thisMapEntry.getValue();
MasterAccessControlEntry objectValue = getElementValue(thisElement);
result.add(objectValue);
}
return result;
}
use of joynr.infrastructure.DacTypes.MasterAccessControlEntry in project joynr by bmwcarit.
the class IltProviderApplication method provisionAccessControl.
private static void provisionAccessControl(Properties properties, String domain) throws Exception {
ObjectMapper objectMapper = new ObjectMapper();
objectMapper.enableDefaultTypingAsProperty(DefaultTyping.JAVA_LANG_OBJECT, "_typeName");
MasterAccessControlEntry newMasterAccessControlEntry = new MasterAccessControlEntry("*", domain, ProviderAnnotations.getInterfaceName(IltProvider.class), TrustLevel.LOW, new TrustLevel[] { TrustLevel.LOW }, TrustLevel.LOW, new TrustLevel[] { TrustLevel.LOW }, "*", Permission.YES, new Permission[] { Permission.YES });
MasterAccessControlEntry[] provisionedAccessControlEntries = { newMasterAccessControlEntry };
String provisionedAccessControlEntriesAsJson = objectMapper.writeValueAsString(provisionedAccessControlEntries);
properties.setProperty(StaticDomainAccessControlProvisioning.PROPERTY_PROVISIONED_MASTER_ACCESSCONTROLENTRIES, provisionedAccessControlEntriesAsJson);
}
use of joynr.infrastructure.DacTypes.MasterAccessControlEntry in project joynr by bmwcarit.
the class EchoProviderApplication method createAppConfig.
private static Properties createAppConfig() throws Exception {
Properties appConfig = new Properties();
ObjectMapper objectMapper = new ObjectMapper();
objectMapper.enableDefaultTypingAsProperty(DefaultTyping.JAVA_LANG_OBJECT, "_typeName");
MasterAccessControlEntry newMasterAccessControlEntry = new MasterAccessControlEntry("*", invocationParams.getDomain(), ProviderAnnotations.getInterfaceName(EchoProviderImpl.class), TrustLevel.LOW, new TrustLevel[] { TrustLevel.LOW }, TrustLevel.LOW, new TrustLevel[] { TrustLevel.LOW }, "*", Permission.YES, new Permission[] { Permission.YES });
MasterAccessControlEntry[] provisionedAccessControlEntries = { newMasterAccessControlEntry };
String provisionedAccessControlEntriesAsJson = objectMapper.writeValueAsString(provisionedAccessControlEntries);
appConfig.setProperty(StaticDomainAccessControlProvisioning.PROPERTY_PROVISIONED_MASTER_ACCESSCONTROLENTRIES, provisionedAccessControlEntriesAsJson);
return appConfig;
}
Aggregations