public boolean addDataUsage ( DataAttribute attribute , DataUsage usage ) throws ParameterException , LockingException { Validate . notNull ( attribute ) ; if ( isFieldLocked ( EntryField . DATA ) ) { if ( ! dataUsage . containsKey ( attribute ) ) { throw new LockingException ( EntryField . DATA ) ; } return false ; } else { if ( dataUsage . get ( attribute ) == null ) { dataUsage . put ( attribute , new HashSet <> ( ) ) ; } if ( usage != null ) { dataUsage . get ( attribute ) . add ( usage ) ; } return true ; } }
Adds the given attribute to the list of attributes