Package org.cyclos.impl.users
Interface RecordFieldHandler
-
- All Known Implementing Classes:
RecordFieldHandlerImpl
public interface RecordFieldHandlerHandler interface for record field permissions
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidassignAllPermissionsToRecordField(RecordType recordType, RecordCustomField recordField, AdminProduct adminProduct)Assigns all the user records permissions (view, edit, create and remove) to the admin product, for the given record fieldRecordCustomFieldfindField(RecordType recordType, CustomFieldVO vo)Finds the field corresponding to the given field value vo in the given type, or throwsEntityNotFoundExceptionif not foundList<RecordCustomField>getAllFields(RecordType type)Returns a sorted list according to the order given to fields of the record typeList<RecordCustomField>getAllVisibleCustomFieldsForQuery(RecordQuery query)Returns all visible custom fields for the given querySet<RecordFieldAction>getFieldActions(RecordType recordType, User user, RecordCustomField field)Returns the actions the logged user can perform for the given type, user (null if type is a system record type) and fieldList<RecordCustomField>getFieldsByAction(UserRecordType recordType, BasicUser user, RecordFieldAction action)Returns the enabled fields of the record type for the given user (and visible to the logged user) and the actions that the logged user can perform over them.List<ProductRecordFieldDTO>getProductRecordFields(Product product, Class<? extends ProductRecordType> relationship)Returns the list of dtos for the given product and relationship determined by the relationship parameterList<ProductRecordFieldDTO>getProductRecordFields(ProductsAccessor accessor, Class<? extends ProductRecordType> relationship)Returns the list of dtos for the given product accessor and relationship determined by the relationship parameterBooleanPropertiesHolder<RecordCustomField>getProductRecordFieldsPropertiesHolder(RecordType recordType, Collection<? extends Product> products, Class<? extends ProductRecordType> relationship)Builds and returns a boolean properties holder for the given record type, list of products and relationship determined by the relationship parameter.List<RecordCustomField>getSystemFieldsByAction(SystemRecordType recordType, RecordFieldAction action)Returns the fields of the given record type that matches with the admin permissions according to the given actionvoidsortFieldValues(RecordType type, List<RecordCustomFieldValue> values)Sort the given list according to the order of the fields in the record type (taking into account shared and local fields).<PRT extends ProductRecordType>
voidtoEntityProductRecordTypes(Product product, Collection<PRT> prdRecordTypes, Collection<? extends ProductRecordFieldDTO> dtos, Class<PRT> relationship)Performs the conversion from the dtos to the prdRecordTypes collection of the relationship determined by the relationship parameter.
-
-
-
Method Detail
-
assignAllPermissionsToRecordField
void assignAllPermissionsToRecordField(RecordType recordType, RecordCustomField recordField, AdminProduct adminProduct)
Assigns all the user records permissions (view, edit, create and remove) to the admin product, for the given record field
-
findField
RecordCustomField findField(RecordType recordType, CustomFieldVO vo)
Finds the field corresponding to the given field value vo in the given type, or throwsEntityNotFoundExceptionif not found
-
getAllFields
List<RecordCustomField> getAllFields(RecordType type)
Returns a sorted list according to the order given to fields of the record type
-
getAllVisibleCustomFieldsForQuery
List<RecordCustomField> getAllVisibleCustomFieldsForQuery(RecordQuery query)
Returns all visible custom fields for the given query
-
getFieldActions
Set<RecordFieldAction> getFieldActions(RecordType recordType, User user, RecordCustomField field)
Returns the actions the logged user can perform for the given type, user (null if type is a system record type) and field
-
getFieldsByAction
List<RecordCustomField> getFieldsByAction(UserRecordType recordType, BasicUser user, RecordFieldAction action)
Returns the enabled fields of the record type for the given user (and visible to the logged user) and the actions that the logged user can perform over them.
-
getProductRecordFields
List<ProductRecordFieldDTO> getProductRecordFields(Product product, Class<? extends ProductRecordType> relationship)
Returns the list of dtos for the given product and relationship determined by the relationship parameter
-
getProductRecordFields
List<ProductRecordFieldDTO> getProductRecordFields(ProductsAccessor accessor, Class<? extends ProductRecordType> relationship)
Returns the list of dtos for the given product accessor and relationship determined by the relationship parameter
-
getProductRecordFieldsPropertiesHolder
BooleanPropertiesHolder<RecordCustomField> getProductRecordFieldsPropertiesHolder(RecordType recordType, Collection<? extends Product> products, Class<? extends ProductRecordType> relationship)
Builds and returns a boolean properties holder for the given record type, list of products and relationship determined by the relationship parameter.
-
getSystemFieldsByAction
List<RecordCustomField> getSystemFieldsByAction(SystemRecordType recordType, RecordFieldAction action)
Returns the fields of the given record type that matches with the admin permissions according to the given action
-
sortFieldValues
void sortFieldValues(RecordType type, List<RecordCustomFieldValue> values)
Sort the given list according to the order of the fields in the record type (taking into account shared and local fields).
-
toEntityProductRecordTypes
<PRT extends ProductRecordType> void toEntityProductRecordTypes(Product product, Collection<PRT> prdRecordTypes, Collection<? extends ProductRecordFieldDTO> dtos, Class<PRT> relationship)
Performs the conversion from the dtos to the prdRecordTypes collection of the relationship determined by the relationship parameter.
-
-