use of com.enonic.xp.data.PropertySet in project xp by enonic.
the class FindNodesByQueryCommandTest_arrays method nested_array_elements.
@Test
public void nested_array_elements() throws Exception {
final PropertyTree data = new PropertyTree();
final PropertySet cars = data.addSet("cars");
final PropertySet car1 = cars.addSet("car");
car1.setString("brand", "skoda");
car1.setString("color", "artic grey");
final PropertySet car2 = cars.addSet("car");
car2.setString("brand", "volvo");
car2.setString("color", "red");
final Node node1 = createNode(CreateNodeParams.create().name("my-node-1").parent(NodePath.ROOT).data(data).indexConfigDocument(PatternIndexConfigDocument.create().analyzer(NodeConstants.DOCUMENT_INDEX_DEFAULT_ANALYZER).defaultConfig(IndexConfig.BY_TYPE).build()).build());
printContentRepoIndex();
compareQueryAndAssert("cars.car.brand", "skoda", node1.id());
compareQueryAndAssert("cars.car.brand", "volvo", node1.id());
compareQueryAndAssert("cars.car.color", "red", node1.id());
compareQueryAndAssert("cars.car.color", "artic grey", node1.id());
}
use of com.enonic.xp.data.PropertySet in project xp by enonic.
the class SecurityAuditLogSupportImpl method removeIdProvider.
@Override
public void removeIdProvider(final IdProviderKey idProviderKey) {
if (isEnabledAuditLogs) {
PropertyTree data = new PropertyTree();
PropertySet paramsSet = data.addSet("params");
paramsSet.setString("key", idProviderKey.toString());
log("system.security.idProvider.delete", data, AuditLogUris.from(idProviderKey.toString()));
}
}
use of com.enonic.xp.data.PropertySet in project xp by enonic.
the class SecurityAuditLogSupportImpl method updateGroup.
@Override
public void updateGroup(UpdateGroupParams params) {
if (isEnabledAuditLogs) {
PropertyTree data = new PropertyTree();
PropertySet paramsSet = data.addSet("params");
paramsSet.setString("key", params.getKey().toString());
paramsSet.setString("displayName", params.getDisplayName());
paramsSet.setString("description", params.getDescription());
log("system.security.principal.update", data, AuditLogUris.from(params.getKey().toString()));
}
}
use of com.enonic.xp.data.PropertySet in project xp by enonic.
the class SecurityAuditLogSupportImpl method removeRelationships.
@Override
public void removeRelationships(final PrincipalKey key) {
if (isEnabledAuditLogs) {
PropertyTree data = new PropertyTree();
PropertySet paramsSet = data.addSet("params");
paramsSet.setString("from", key.toString());
log("system.security.principal.removeRelationships", data, AuditLogUris.from(key.toString()));
}
}
use of com.enonic.xp.data.PropertySet in project xp by enonic.
the class SecurityAuditLogSupportImpl method createRole.
@Override
public void createRole(final CreateRoleParams params) {
if (isEnabledAuditLogs) {
PropertyTree data = new PropertyTree();
PropertySet paramsSet = data.addSet("params");
paramsSet.setString("key", params.getKey().toString());
paramsSet.setString("displayName", params.getDisplayName());
paramsSet.setString("description", params.getDescription());
log("system.security.principal.create", data, AuditLogUris.from(params.getKey().toString()));
}
}
Aggregations