@Override public Set<NavigableField> getNavigableFields() { return Collections.unmodifiableSet(getAvailableNavigableFields()); }
/** * Returns a set of {@link Field}s that are NOT hidden in AT LEAST ONE project in the system. * <p/> * NOTE: This method is used in the Admin interface, as admins should be able to configure the default ColumnLayouts * irrespective of their permissions. They should be able to see all fields that are not hidden in at least one * FieldLayout in the system * * @throws FieldException if cannot retrieve the projects the user can see, or if cannot retrieve the field layouts * for the viewable projects */ @Override public Set<NavigableField> getAllAvailableNavigableFields() throws FieldException { try { // Include custom fields (irrespective of scope) and exclude fields that should not be available (e.g. timetracking if it is turned off) final Set<NavigableField> allAvailableFields = getAvailableNavigableFields(); // Retrieve all unique FieldLayouts in the system final Set<FieldLayout> uniqueSchemes = getAllFieldLayouts(); // Go through the list of available fields and see of the field is NOT hidden in at least one scheme return getAvailableFields(allAvailableFields, uniqueSchemes); } catch (DataAccessException e) { final String message = "Error retrieving field layout."; LOG.error(message, e); throw new FieldException(message, e); } }
final Set<NavigableField> allAvailableFields = getAvailableNavigableFields();