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/identityimport/web/rs/service/BatchImportTransportRest.java |
80 |
fr/paris/lutece/plugins/identityimport/web/rs/service/BatchImportTransportRest.java |
99 |
public BatchImportResponse importBatch( final BatchImportRequest request, final String strClientCode, final RequestAuthor author )
throws IdentityStoreException
{
this.checkCommonHeaders( strClientCode, author );
final Map<String, String> mapHeadersRequest = new HashMap<>( );
mapHeadersRequest.put( Constants.PARAM_CLIENT_CODE, strClientCode );
mapHeadersRequest.put( Constants.PARAM_AUTHOR_NAME, author.getName( ) );
mapHeadersRequest.put( Constants.PARAM_AUTHOR_TYPE, author.getType( ).name( ) );
final Map<String, String> mapParams = new HashMap<>( );
return _httpTransport.doPostJSON( _strIdentityStoreImportEndPoint + Constants.VERSION_PATH_V3 + Constants.BATCH_PATH, mapParams, mapHeadersRequest, |
Fichier |
Ligne |
fr/paris/lutece/plugins/identityimport/web/rs/service/HttpAccessTransport.java |
105 |
fr/paris/lutece/plugins/identityimport/web/rs/service/HttpAccessTransport.java |
136 |
public <T extends ResponseDto> T doPostJSON( String strUrl, Map<String, String> mapParams, Map<String, String> mapHeadersRequest, Object json,
Class<T> responseJsonClass, ObjectMapper mapper ) throws IdentityStoreException
{
final Map<String, String> mapHeadersResponse = new HashMap<>( );
mapHeadersRequest.put( HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON );
mapHeadersRequest.put( HttpHeaders.CONTENT_TYPE, Constants.CONTENT_FORMAT_CHARSET );
T oResponse = null;
try
{
addAuthentication( mapHeadersRequest );
String strJSON = mapper.writeValueAsString( json );
String strResponseJSON = this._httpClient.doPostJSON( strUrl, strJSON, mapHeadersRequest, mapHeadersResponse ); |
Fichier |
Ligne |
fr/paris/lutece/plugins/identityimport/web/rs/service/HttpAccessTransport.java |
193 |
fr/paris/lutece/plugins/identityimport/web/rs/service/HttpAccessTransport.java |
223 |
public <T extends ResponseDto> T doGet( String strEndPointUrl, Map<String, String> mapParams, Map<String, String> mapHeadersRequest,
Class<T> responseJsonClass, ObjectMapper mapper ) throws IdentityStoreException
{
T oResponse = null;
try
{
URIBuilder uriBuilder = new URIBuilder( strEndPointUrl );
if ( ( mapParams != null ) && !mapParams.isEmpty( ) )
{
for ( String strParamKey : mapParams.keySet( ) )
{
uriBuilder.addParameter( strParamKey, mapParams.get( strParamKey ) );
}
}
addAuthentication( mapHeadersRequest );
String strResponseJSON = this._httpClient.doGet( uriBuilder.toString( ), null, null, mapHeadersRequest ); |