org.squashtest.csp.tm.internal.service.customField
Class PrivateCustomFieldValueServiceImpl

java.lang.Object
  extended by org.squashtest.csp.tm.internal.service.customField.PrivateCustomFieldValueServiceImpl
All Implemented Interfaces:
PrivateCustomFieldValueService, CustomFieldValueFinderService, CustomFieldValueManagerService

@Service(value="squashtest.tm.service.CustomFieldValueManagerService")
public class PrivateCustomFieldValueServiceImpl
extends Object
implements PrivateCustomFieldValueService


Constructor Summary
PrivateCustomFieldValueServiceImpl()
           
 
Method Summary
 void cascadeCustomFieldValuesCreation(CustomFieldBinding binding)
          Will create a custom field value for all the entities affected by the given binding
 void cascadeCustomFieldValuesDeletion(CustomFieldBinding binding)
          Will remove the custom field values corresponding to the given binding
 void cascadeCustomFieldValuesDeletion(List<Long> customFieldBindingIds)
          Will remove the custom field values corresponding to the bindings, given their ids.
 void copyCustomFieldValues(BoundEntity source, BoundEntity recipient)
          Will copy the custom field values from an entity to another entity, creating them in the process
 void copyCustomFieldValuesContent(BoundEntity source, BoundEntity recipient)
          Will copy the custom field values from an entity to another entity.
 void createAllCustomFieldValues(BoundEntity entity)
          Will create all the custom field values for one entity.
 void deleteAllCustomFieldValues(BindableEntity entityType, List<Long> entityIds)
          Will delete all the custom field values for multiple BoundEntities
 void deleteAllCustomFieldValues(BoundEntity entity)
          will delete all the custom field vales for one entity
 List<CustomFieldValue> findAllCustomFieldValues(BoundEntity boundEntity)
          Will return the list of the custom field values associated to the specified bound entity.
 List<CustomFieldValue> findAllCustomFieldValues(Long boundEntityId, BindableEntity bindableEntity)
          Same as CustomFieldValueFinderService.findAllCustomFieldValues(BoundEntity), but the properties identifying a BoundEntity are broken down into its ID and type.
 boolean hasCustomFields(BoundEntity boundEntity)
          Tells whether the given bound entity has custom fields or not.
 boolean hasCustomFields(Long boundEntityId, BindableEntity bindableEntity)
          Same as CustomFieldValueFinderService.hasCustomFields(BoundEntity), the bound entity being identified by its type and id
 void setPermissionService(org.squashtest.csp.core.service.security.PermissionEvaluationService permissionService)
           
 void update(Long customFieldValueId, String newValue)
          Will update the value of a CustomFieldValue using its Id.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrivateCustomFieldValueServiceImpl

public PrivateCustomFieldValueServiceImpl()
Method Detail

setPermissionService

@ServiceReference
public void setPermissionService(org.squashtest.csp.core.service.security.PermissionEvaluationService permissionService)

hasCustomFields

public boolean hasCustomFields(BoundEntity boundEntity)
Description copied from interface: CustomFieldValueFinderService
Tells whether the given bound entity has custom fields or not.

Specified by:
hasCustomFields in interface CustomFieldValueFinderService
Returns:

hasCustomFields

public boolean hasCustomFields(Long boundEntityId,
                               BindableEntity bindableEntity)
Description copied from interface: CustomFieldValueFinderService
Same as CustomFieldValueFinderService.hasCustomFields(BoundEntity), the bound entity being identified by its type and id

Specified by:
hasCustomFields in interface CustomFieldValueFinderService
Returns:

findAllCustomFieldValues

public List<CustomFieldValue> findAllCustomFieldValues(BoundEntity boundEntity)
Description copied from interface: CustomFieldValueFinderService
Will return the list of the custom field values associated to the specified bound entity. The authenticated use must be administrator or have read permission on that entity.

Specified by:
findAllCustomFieldValues in interface CustomFieldValueFinderService
Returns:

findAllCustomFieldValues

public List<CustomFieldValue> findAllCustomFieldValues(Long boundEntityId,
                                                       BindableEntity bindableEntity)
Description copied from interface: CustomFieldValueFinderService
Same as CustomFieldValueFinderService.findAllCustomFieldValues(BoundEntity), but the properties identifying a BoundEntity are broken down into its ID and type.

Specified by:
findAllCustomFieldValues in interface CustomFieldValueFinderService
Returns:

cascadeCustomFieldValuesCreation

public void cascadeCustomFieldValuesCreation(CustomFieldBinding binding)
Description copied from interface: PrivateCustomFieldValueService
Will create a custom field value for all the entities affected by the given binding

Specified by:
cascadeCustomFieldValuesCreation in interface PrivateCustomFieldValueService

cascadeCustomFieldValuesDeletion

public void cascadeCustomFieldValuesDeletion(CustomFieldBinding binding)
Description copied from interface: PrivateCustomFieldValueService
Will remove the custom field values corresponding to the given binding

Specified by:
cascadeCustomFieldValuesDeletion in interface PrivateCustomFieldValueService

cascadeCustomFieldValuesDeletion

public void cascadeCustomFieldValuesDeletion(List<Long> customFieldBindingIds)
Description copied from interface: PrivateCustomFieldValueService
Will remove the custom field values corresponding to the bindings, given their ids.

Specified by:
cascadeCustomFieldValuesDeletion in interface PrivateCustomFieldValueService

createAllCustomFieldValues

public void createAllCustomFieldValues(BoundEntity entity)
Description copied from interface: PrivateCustomFieldValueService
Will create all the custom field values for one entity.

Specified by:
createAllCustomFieldValues in interface PrivateCustomFieldValueService

deleteAllCustomFieldValues

public void deleteAllCustomFieldValues(BoundEntity entity)
Description copied from interface: PrivateCustomFieldValueService
will delete all the custom field vales for one entity

Specified by:
deleteAllCustomFieldValues in interface PrivateCustomFieldValueService

deleteAllCustomFieldValues

public void deleteAllCustomFieldValues(BindableEntity entityType,
                                       List<Long> entityIds)
Description copied from interface: PrivateCustomFieldValueService
Will delete all the custom field values for multiple BoundEntities

Specified by:
deleteAllCustomFieldValues in interface PrivateCustomFieldValueService
Parameters:
entityType - the BindableEntity that all of the BoundEntity must share
entityIds - the ids of those BoundEntities

copyCustomFieldValues

public void copyCustomFieldValues(BoundEntity source,
                                  BoundEntity recipient)
Description copied from interface: PrivateCustomFieldValueService
Will copy the custom field values from an entity to another entity, creating them in the process

Specified by:
copyCustomFieldValues in interface PrivateCustomFieldValueService

copyCustomFieldValuesContent

public void copyCustomFieldValuesContent(BoundEntity source,
                                         BoundEntity recipient)
Description copied from interface: PrivateCustomFieldValueService
Will copy the custom field values from an entity to another entity. It assumes that the custom field values already exists for both, and will simply invoke CustomFieldValue.setValue(String) from one to the other.

Specified by:
copyCustomFieldValuesContent in interface PrivateCustomFieldValueService

update

public void update(Long customFieldValueId,
                   String newValue)
Description copied from interface: CustomFieldValueManagerService
Will update the value of a CustomFieldValue using its Id. The service will check that the requestor has the correct credentials.

Specified by:
update in interface CustomFieldValueManagerService


Copyright © 2010-2012 Henix, henix.fr. All Rights Reserved.