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/identitystore/modules/quality/web/request/IdentityStoreSuspiciousCancelExclusionRequest.java |
71 |
| fr/paris/lutece/plugins/identitystore/modules/quality/web/request/IdentityStoreSuspiciousExcludeRequest.java |
68 |
public IdentityStoreSuspiciousCancelExclusionRequest( final SuspiciousIdentityExcludeRequest request, final String strClientCode,
final String strAppCode, final String authorName, final String authorType ) throws IdentityStoreException
{
super( strClientCode, strAppCode, authorName, authorType );
if ( request == null )
{
throw new RequestFormatException( "The provided request is null or empty.", Constants.PROPERTY_REST_ERROR_SUSPICIOUS_EXCLUDE_REQUEST_NULL_OR_EMPTY );
}
this._request = request;
}
@Override
protected void fetchResources( ) throws ResourceNotFoundException
{
firstIdentity = IdentityHome.findByCustomerId( _request.getIdentityCuid1( ) );
if ( firstIdentity == null )
{
throw new ResourceNotFoundException( "Cannot find identity with cuid " + _request.getIdentityCuid1( ),
Constants.PROPERTY_REST_ERROR_IDENTITY_NOT_FOUND );
}
secondIdentity = IdentityHome.findByCustomerId( _request.getIdentityCuid2( ) );
if ( secondIdentity == null )
{
throw new ResourceNotFoundException( "Cannot find identity with cuid " + _request.getIdentityCuid2( ),
Constants.PROPERTY_REST_ERROR_IDENTITY_NOT_FOUND );
}
}
@Override
protected void validateRequestFormat( ) throws RequestFormatException
{
SuspiciousIdentityRequestValidator.instance( ).checkSuspiciousIdentityExclude( _request );
}
@Override
protected void validateClientAuthorization( ) throws ClientAuthorizationException
{
// Do nothing
}
@Override
protected void validateResourcesConsistency( ) throws ResourceConsistencyException
{
ExcludeSuspiciousIdentityValidator.instance( ).validateExclusionCancelation( _request ); |
| Fichier |
Ligne |
| fr/paris/lutece/plugins/identitystore/modules/quality/web/ManageSuspiciousIdentitys.java |
417 |
| fr/paris/lutece/plugins/identitystore/modules/quality/web/ManageSuspiciousIdentitys.java |
765 |
identities.add( secondIdentity );
readableAttributes = new ArrayList<>( AttributeKeyHome.getAttributeKeysList( false ) );
final Comparator<AttributeKey> sortById = Comparator.comparing( AttributeKey::getId );
final Comparator<AttributeKey> sortByPivot = ( o1, o2 ) -> Boolean.compare( o2.getPivot( ), o1.getPivot( ) );
readableAttributes.sort( sortByPivot.thenComparing( sortById ) );
}
catch( final Exception e )
{
addError( "An error occurred when identities : " + e.getMessage( ) );
return getDuplicateTypes( request );
}
final Map<String, Object> model = getModel( );
model.put( MARK_IDENTITY_LIST, identities );
model.put( MARK_FIRST_CUSTOMER_ID, firstCustomerId ); |
| Fichier |
Ligne |
| fr/paris/lutece/plugins/identitystore/modules/quality/rs/SuspiciousIdentityRest.java |
147 |
| fr/paris/lutece/plugins/identitystore/modules/quality/rs/SuspiciousIdentityRest.java |
167 |
@ApiParam( name = "Request body", value = "An Identity exclusion request" ) SuspiciousIdentityExcludeRequest suspiciousIdentityExcludeRequest,
@ApiParam( name = Constants.PARAM_CLIENT_CODE, value = SwaggerConstants.PARAM_CLIENT_CODE_DESCRIPTION ) @HeaderParam( Constants.PARAM_CLIENT_CODE ) final String strHeaderClientCode,
@ApiParam( name = Constants.PARAM_AUTHOR_NAME, value = SwaggerConstants.PARAM_AUTHOR_NAME_DESCRIPTION ) @HeaderParam( Constants.PARAM_AUTHOR_NAME ) String authorName,
@ApiParam( name = Constants.PARAM_AUTHOR_TYPE, value = SwaggerConstants.PARAM_AUTHOR_TYPE_DESCRIPTION ) @HeaderParam( Constants.PARAM_AUTHOR_TYPE ) String authorType,
@ApiParam( name = Constants.PARAM_APPLICATION_CODE, value = SwaggerConstants.PARAM_APPLICATION_CODE_DESCRIPTION ) @HeaderParam( Constants.PARAM_APPLICATION_CODE ) @DefaultValue( "" ) String strHeaderAppCode )
throws IdentityStoreException
{
final IdentityStoreSuspiciousExcludeRequest request = new IdentityStoreSuspiciousExcludeRequest( suspiciousIdentityExcludeRequest, strHeaderClientCode, |
| Fichier |
Ligne |
| fr/paris/lutece/plugins/identitystore/modules/quality/rs/SuspiciousIdentityRest.java |
147 |
| fr/paris/lutece/plugins/identitystore/modules/quality/rs/SuspiciousIdentityRest.java |
167 |
| fr/paris/lutece/plugins/identitystore/modules/quality/rs/SuspiciousIdentityRest.java |
257 |
@ApiParam( name = "Request body", value = "An Identity exclusion request" ) SuspiciousIdentityExcludeRequest suspiciousIdentityExcludeRequest,
@ApiParam( name = Constants.PARAM_CLIENT_CODE, value = SwaggerConstants.PARAM_CLIENT_CODE_DESCRIPTION ) @HeaderParam( Constants.PARAM_CLIENT_CODE ) final String strHeaderClientCode,
@ApiParam( name = Constants.PARAM_AUTHOR_NAME, value = SwaggerConstants.PARAM_AUTHOR_NAME_DESCRIPTION ) @HeaderParam( Constants.PARAM_AUTHOR_NAME ) String authorName,
@ApiParam( name = Constants.PARAM_AUTHOR_TYPE, value = SwaggerConstants.PARAM_AUTHOR_TYPE_DESCRIPTION ) @HeaderParam( Constants.PARAM_AUTHOR_TYPE ) String authorType,
@ApiParam( name = Constants.PARAM_APPLICATION_CODE, value = SwaggerConstants.PARAM_APPLICATION_CODE_DESCRIPTION ) @HeaderParam( Constants.PARAM_APPLICATION_CODE ) @DefaultValue( "" ) String strHeaderAppCode )
throws IdentityStoreException
{
final IdentityStoreSuspiciousExcludeRequest request = new IdentityStoreSuspiciousExcludeRequest( suspiciousIdentityExcludeRequest, strHeaderClientCode, |