/** * Marks a property as hidden for a given visibility. * * @param property The property. * @param visibility The visibility string under which this property is hidden. * This visibility can be a superset of the property visibility to mark * it as hidden for only a subset of authorizations. * @param authorizations The authorizations used. */ default void markPropertyHidden(Property property, Visibility visibility, Authorizations authorizations) { markPropertyHidden(property, null, visibility, authorizations); }
/** * Marks a property as hidden for a given visibility. * * @param property The property. * @param visibility The visibility string under which this property is hidden. * This visibility can be a superset of the property visibility to mark * it as hidden for only a subset of authorizations. * @param authorizations The authorizations used. */ default void markPropertyHidden(Property property, Visibility visibility, Authorizations authorizations) { markPropertyHidden(property, null, visibility, authorizations); }
/** * Marks a property as hidden for a given visibility. * * @param key The key of the property. * @param name The name of the property. * @param propertyVisibility The visibility of the property. * @param visibility The visibility string under which this property is hidden. * This visibility can be a superset of the property visibility to mark * it as hidden for only a subset of authorizations. * @param authorizations The authorizations used. */ default void markPropertyHidden(String key, String name, Visibility propertyVisibility, Visibility visibility, Authorizations authorizations) { markPropertyHidden(key, name, propertyVisibility, null, visibility, authorizations); }
/** * Marks a property as hidden for a given visibility. * * @param key The key of the property. * @param name The name of the property. * @param propertyVisibility The visibility of the property. * @param visibility The visibility string under which this property is hidden. * This visibility can be a superset of the property visibility to mark * it as hidden for only a subset of authorizations. * @param authorizations The authorizations used. */ default void markPropertyHidden(String key, String name, Visibility propertyVisibility, Visibility visibility, Authorizations authorizations) { markPropertyHidden(key, name, propertyVisibility, null, visibility, authorizations); }
public void hideProperty( List<VisalloPropertyUpdate> changedPropertiesOut, Element element, Property propertyToHide, String workspaceId, Authorizations authorizations ) { long beforeDeletionTimestamp = System.currentTimeMillis() - 1; element.markPropertyHidden(propertyToHide, new Visibility(workspaceId), authorizations); changedPropertiesOut.add(new VisalloPropertyUpdateRemove(this, propertyToHide.getKey(), beforeDeletionTimestamp, false, true)); }
/** * Marks a property as hidden for a given visibility. * * @param key The key of the property. * @param name The name of the property. * @param propertyVisibility The visibility of the property. * @param timestamp The timestamp. * @param visibility The visibility string under which this property is hidden. * This visibility can be a superset of the property visibility to mark * it as hidden for only a subset of authorizations. * @param authorizations The authorizations used. */ default void markPropertyHidden(String key, String name, Visibility propertyVisibility, Long timestamp, Visibility visibility, Authorizations authorizations) { Iterable<Property> properties = getProperties(key, name); for (Property property : properties) { if (property.getVisibility().equals(propertyVisibility)) { markPropertyHidden(property, timestamp, visibility, authorizations); return; } } throw new IllegalArgumentException("Could not find property " + key + " : " + name + " : " + propertyVisibility); }
/** * Marks a property as hidden for a given visibility. * * @param key The key of the property. * @param name The name of the property. * @param propertyVisibility The visibility of the property. * @param timestamp The timestamp. * @param visibility The visibility string under which this property is hidden. * This visibility can be a superset of the property visibility to mark * it as hidden for only a subset of authorizations. * @param authorizations The authorizations used. */ default void markPropertyHidden(String key, String name, Visibility propertyVisibility, Long timestamp, Visibility visibility, Authorizations authorizations) { Iterable<Property> properties = getProperties(key, name); for (Property property : properties) { if (property.getVisibility().equals(propertyVisibility)) { markPropertyHidden(property, timestamp, visibility, authorizations); return; } } throw new IllegalArgumentException("Could not find property " + key + " : " + name + " : " + propertyVisibility); }
public void deleteProperty( Element e, Property property, boolean propertyIsPublic, String workspaceId, Priority priority, Authorizations authorizations ) { long beforeActionTimestamp = System.currentTimeMillis() - 1; ElementOrPropertyStatus status; if (propertyIsPublic && workspaceId != null) { e.markPropertyHidden(property, new Visibility(workspaceId), authorizations); status = ElementOrPropertyStatus.HIDDEN; } else { e.softDeleteProperty(property.getKey(), property.getName(), property.getVisibility(), authorizations); status = ElementOrPropertyStatus.DELETION; } if (e instanceof Vertex) { unresolveTermMentionsForProperty((Vertex) e, property, authorizations); } graph.flush(); workQueueRepository.pushGraphPropertyQueueHiddenOrDeleted(e, property, status, beforeActionTimestamp, workspaceId, priority); }
long beforeDeletionTimestamp = System.currentTimeMillis() - 1; element.markPropertyHidden(publicProperty, new Visibility(workspaceId), authorizations); graph.flush(); workQueueRepository.pushGraphPropertyQueueHiddenOrDeleted(element, publicProperty, ElementOrPropertyStatus.HIDDEN, beforeDeletionTimestamp, workspaceId, Priority.HIGH);