Résultats CPD
Le document suivant contient les résultats de l'inspection CPD CPD 6.13.0.
Duplicatas
Fichier |
Ligne |
fr/paris/lutece/plugins/workflow/modules/unittree/service/prerequisite/ChildUnitAssignedResourcePrerequisite.java |
59 |
fr/paris/lutece/plugins/workflow/modules/unittree/service/prerequisite/UserUnitAssignedResourcePrerequisite.java |
57 |
public String getTitleI18nKey( )
{
return PREREQUISITE_TITLE_I18N;
}
public String getPrerequisiteType( )
{
return PREREQUISITE_TYPE;
}
@Override
public boolean hasConfiguration( )
{
return false;
}
@Override
public IPrerequisiteConfig getEmptyConfiguration( )
{
return new DefaultPrerequisiteConfig( );
}
@Override
public String getConfigurationDaoBeanName( )
{
return null;
}
@Override
public String getConfigHtml( IPrerequisiteConfig config, HttpServletRequest request, Locale locale )
{
return null;
}
@Override
public boolean canActionBePerformed( int nIdResource, String strResourceType, IPrerequisiteConfig config, int nIdAction )
{
return false;
}
@Override
public boolean canManualActionBePerformed( User user, int nIdResource, String strResourceType, IPrerequisiteConfig config, int nIdAction )
{
if ( !( user instanceof AdminUser ) )
{
return false;
}
List<Unit> userUnitList = UnitHome.findByIdUser( ( (AdminUser) user ).getUserId( ) ); |
Fichier |
Ligne |
fr/paris/lutece/plugins/workflow/modules/unittree/service/task/selection/impl/UnitSelectionAssignor.java |
156 |
fr/paris/lutece/plugins/workflow/modules/unittree/service/task/selection/impl/UnitSelectionParent.java |
159 |
fr/paris/lutece/plugins/workflow/modules/unittree/service/task/selection/impl/UnitSelectionSpecificUnit.java |
302 |
private static final String TEMPLATE_AUTOMATIC_TASK_FORM = "admin/plugins/workflow/modules/unittree/unitselection/form/unit_selection_automatic_form.html";
// Markers
private static final String MARK_ASSIGNED_UNIT = "assigned_unit";
/**
* {@inheritDoc}
*/
@Override
public String getTitle( Locale locale )
{
return I18nService.getLocalizedString( MESSAGE_TITLE, locale );
}
/**
* {@inheritDoc}
*/
@Override
public String getDisplayedForm( int nIdResource, String strResourceType, Locale locale, ITask task ) throws AssignmentNotPossibleException
{
Unit unitAssigned = _unitService.getUnit( select( nIdResource, strResourceType, null, task ), false );
Map<String, Object> model = new HashMap<>( );
model.put( MARK_ASSIGNED_UNIT, unitAssigned );
HtmlTemplate template = AppTemplateService.getTemplate( TEMPLATE_AUTOMATIC_TASK_FORM, locale, model );
return template.getHtml( );
}
}
} |
Fichier |
Ligne |
fr/paris/lutece/plugins/workflow/modules/unittree/service/task/selection/impl/UnitSelectionAssignor.java |
67 |
fr/paris/lutece/plugins/workflow/modules/unittree/service/task/selection/impl/UnitSelectionParent.java |
65 |
@Inject
private IUnitService _unitService;
private final IConfigurationHandler _configurationHandler = new ConfigurationHandler( );
private final ITaskFormHandler _taskFormHandler = new TaskFormHandler( );
/**
* {@inheritDoc}
*/
@Override
public String getId( )
{
return ID;
}
/**
* {@inheritDoc}
*/
@Override
public boolean isAutomatic( )
{
return true;
}
/**
* {@inheritDoc}
*/
@Override
public IConfigurationHandler getConfigurationHandler( )
{
return _configurationHandler;
}
/**
* {@inheritDoc}
*/
@Override
public ITaskFormHandler getTaskFormHandler( )
{
return _taskFormHandler;
}
/**
* {@inheritDoc}
*/
@Override
public int select( int nIdResource, String strResourceType, HttpServletRequest request, ITask task ) throws AssignmentNotPossibleException
{
UnitAssignment unitAssignment = UnitAssignmentService.findCurrentAssignment( nIdResource, strResourceType );
if ( unitAssignment == null || UnitAssignmentType.CREATION == unitAssignment.getAssignmentType( ) |