Search in sources :

Example 11 with AccessPolicySummaryEntity

use of org.apache.nifi.web.api.entity.AccessPolicySummaryEntity in project nifi by apache.

the class EntityFactory method createAccessPolicySummaryEntity.

public AccessPolicySummaryEntity createAccessPolicySummaryEntity(final AccessPolicySummaryDTO dto, final RevisionDTO revision, final PermissionsDTO permissions) {
    final AccessPolicySummaryEntity entity = new AccessPolicySummaryEntity();
    entity.setRevision(revision);
    if (dto != null) {
        entity.setPermissions(permissions);
        entity.setId(dto.getId());
        if (permissions != null && permissions.getCanRead()) {
            entity.setComponent(dto);
        }
    }
    return entity;
}
Also used : AccessPolicySummaryEntity(org.apache.nifi.web.api.entity.AccessPolicySummaryEntity)

Aggregations

HashMap (java.util.HashMap)10 HashSet (java.util.HashSet)9 Map (java.util.Map)9 AccessPolicySummaryEntity (org.apache.nifi.web.api.entity.AccessPolicySummaryEntity)9 Sets (com.google.common.collect.Sets)8 IOException (java.io.IOException)8 StandardCharsets (java.nio.charset.StandardCharsets)8 ArrayList (java.util.ArrayList)8 Arrays (java.util.Arrays)8 Collection (java.util.Collection)8 Collections (java.util.Collections)8 Comparator (java.util.Comparator)8 Date (java.util.Date)8 LinkedHashMap (java.util.LinkedHashMap)8 LinkedHashSet (java.util.LinkedHashSet)8 List (java.util.List)8 ListIterator (java.util.ListIterator)8 Objects (java.util.Objects)8 Optional (java.util.Optional)8 Set (java.util.Set)8