public boolean setDataUsage ( Map < DataAttribute , Set < DataUsage > > dataUsage ) throws ParameterException , LockingException { Validate . notNull ( dataUsage ) ; Validate . notEmpty ( dataUsage . keySet ( ) ) ; Validate . noNullElements ( dataUsage . keySet ( ) ) ; Validate . noNullElements ( dataUsage . values ( ) ) ; if ( isFieldLocked ( EntryField . DATA ) ) { if ( ! this . dataUsage . equals ( dataUsage ) ) { throw new LockingException ( EntryField . DATA ) ; } return false ; } else { this . dataUsage = dataUsage ; return true ; } }
Sets the given data usage as data usage for this entry .