use of com.enonic.xp.data.PropertySet in project xp by enonic.
the class ContentAuditLogSupportImpl method doCreateSite.
private void doCreateSite(final CreateSiteParams params, final Site site, final Context rootContext) {
final PropertyTree data = new PropertyTree();
final PropertySet paramsSet = data.addSet("params");
final PropertySet resultSet = data.addSet("result");
paramsSet.setString("description", params.getDescription());
paramsSet.setString("parentContentPath", nullToNull(params.getParentContentPath()));
paramsSet.setString("name", nullToNull(params.getName()));
paramsSet.setString("displayName", params.getDisplayName());
addContent(resultSet, site);
log("system.content.create", data, site.getPath(), rootContext);
}
use of com.enonic.xp.data.PropertySet in project xp by enonic.
the class ContentAuditLogSupportImpl method doCreateContent.
private void doCreateContent(final CreateContentParams params, final Content content, final Context rootContext) {
final PropertyTree data = new PropertyTree();
final PropertySet paramsSet = data.addSet("params");
final PropertySet resultSet = data.addSet("result");
paramsSet.addString("displayName", params.getDisplayName());
paramsSet.addString("type", nullToNull(params.getType()));
paramsSet.addString("name", nullToNull(params.getName()));
paramsSet.addBoolean("requireValid", params.isRequireValid());
paramsSet.addBoolean("inheritPermissions", params.isInheritPermissions());
if (params.getProcessedIds() != null) {
paramsSet.addStrings("processedIds", params.getProcessedIds().stream().map(ContentId::toString).collect(Collectors.toList()));
}
if (params.getPermissions() != null) {
paramsSet.addStrings("permissions", params.getPermissions().getEntries().stream().map(AccessControlEntry::toString).collect(Collectors.toList()));
}
addContent(resultSet, content);
log("system.content.create", data, content.getPath(), rootContext);
}
use of com.enonic.xp.data.PropertySet in project xp by enonic.
the class ContentAuditLogSupportImpl method doRename.
private void doRename(final RenameContentParams params, final Content content, final Context rootContext) {
final PropertyTree data = new PropertyTree();
final PropertySet paramsSet = data.addSet("params");
final PropertySet resultSet = data.addSet("result");
paramsSet.addString("contentId", nullToNull(params.getContentId()));
paramsSet.addString("newName", nullToNull(params.getNewName()));
addContent(resultSet, content);
log("system.content.rename", data, content.getId(), rootContext);
}
use of com.enonic.xp.data.PropertySet in project xp by enonic.
the class ContentAuditLogSupportImpl method doArchive.
private void doArchive(final ArchiveContentParams params, final ArchiveContentsResult result, final Context rootContext) {
final PropertyTree data = new PropertyTree();
final PropertySet paramsSet = data.addSet("params");
final PropertySet resultSet = data.addSet("result");
paramsSet.addString("contentId", nullToNull(params.getContentId()));
addContents(resultSet, result.getArchivedContents(), "archivedContents");
log("system.content.archive", data, params.getContentId(), rootContext);
}
use of com.enonic.xp.data.PropertySet in project xp by enonic.
the class ContentAuditLogSupportImpl method doReorderChildren.
private void doReorderChildren(final ReorderChildContentsParams params, final ReorderChildContentsResult result, final Context rootContext) {
final PropertyTree data = new PropertyTree();
final PropertySet paramsSet = data.addSet("params");
final PropertySet resultSet = data.addSet("result");
paramsSet.addString("contentId", nullToNull(params.getContentId()));
paramsSet.addBoolean("silent", params.isSilent());
resultSet.addLong("size", (long) result.getMovedChildren());
log("system.content.reorderChildren", data, params.getContentId(), rootContext);
}
Aggregations