CPD Results
The following document contains the results of PMD's CPD 6.13.0.
Duplications
File |
Line |
fr/paris/lutece/plugins/identitystore/business/contract/ServiceContractDAO.java |
89 |
fr/paris/lutece/plugins/identitystore/business/contract/ServiceContractDAO.java |
311 |
daoUtil.setString( nIndex++, serviceContract.getName( ) );
daoUtil.setString( nIndex++, serviceContract.getMoaEntityName( ) );
daoUtil.setString( nIndex++, serviceContract.getMoeResponsibleName( ) );
daoUtil.setString( nIndex++, serviceContract.getMoaContactName( ) );
daoUtil.setString( nIndex++, serviceContract.getMoeEntityName( ) );
daoUtil.setInt( nIndex++, serviceContract.getDataRetentionPeriodInMonths( ) );
daoUtil.setString( nIndex++, serviceContract.getServiceType( ) );
daoUtil.setDate( nIndex++, serviceContract.getStartingDate( ) );
daoUtil.setDate( nIndex++, serviceContract.getEndingDate( ) );
daoUtil.setBoolean( nIndex++, serviceContract.getAuthorizedCreation( ) );
daoUtil.setBoolean( nIndex++, serviceContract.getAuthorizedUpdate( ) );
daoUtil.setBoolean( nIndex++, serviceContract.getAuthorizedSearch( ) );
daoUtil.setBoolean( nIndex++, serviceContract.getAuthorizedMerge( ) );
daoUtil.setBoolean( nIndex++, serviceContract.getAuthorizedAccountUpdate( ) );
daoUtil.setBoolean( nIndex++, serviceContract.getAuthorizedDeletion( ) );
daoUtil.setBoolean( nIndex++, serviceContract.getAuthorizedImport( ) );
daoUtil.setBoolean( nIndex++, serviceContract.getAuthorizedExport( ) );
daoUtil.setBoolean( nIndex++, serviceContract.getAuthorizedDecertification( ) );
daoUtil.setBoolean( nIndex, serviceContract.getAuthorizedAgentHistoryRead( ) ); |
File |
Line |
fr/paris/lutece/plugins/identitystore/business/attribute/AttributeKeyDAO.java |
203 |
fr/paris/lutece/plugins/identitystore/business/attribute/AttributeKeyDAO.java |
339 |
try ( final DAOUtil daoUtil = new DAOUtil( SQL_QUERY_SELECTALL, plugin ) )
{
daoUtil.executeQuery( );
final List<AttributeKey> attributeKeyList = new ArrayList<>( );
while ( daoUtil.next( ) )
{
final AttributeKey attributeKey = new AttributeKey( );
int nIndex = 1;
attributeKey.setId( daoUtil.getInt( nIndex++ ) );
attributeKey.setName( daoUtil.getString( nIndex++ ) );
attributeKey.setKeyName( daoUtil.getString( nIndex++ ) );
attributeKey.setCommonSearchKeyName( daoUtil.getString( nIndex++ ) );
attributeKey.setDescription( daoUtil.getString( nIndex++ ) );
attributeKey.setKeyType( KeyType.valueOf( daoUtil.getInt( nIndex++ ) ) );
attributeKey.setCertifiable( daoUtil.getBoolean( nIndex++ ) );
attributeKey.setPivot( daoUtil.getBoolean( nIndex++ ) );
attributeKey.setKeyWeight( daoUtil.getInt( nIndex++ ) );
attributeKey.setMandatoryForCreation( daoUtil.getBoolean( nIndex++ ) );
attributeKey.setValidationRegex( daoUtil.getString( nIndex++ ) );
attributeKey.setValidationErrorMessage( daoUtil.getString( nIndex++ ) );
attributeKey.setValidationErrorMessageKey( daoUtil.getString( nIndex ) );
attributeKeyList.add( attributeKey );
}
return attributeKeyList;
}
}
/**
* {@inheritDoc }
*/
@Override
public ReferenceList selectAttributeKeysReferenceList( Plugin plugin ) |
File |
Line |
fr/paris/lutece/plugins/identitystore/business/attribute/AttributeKeyDAO.java |
124 |
fr/paris/lutece/plugins/identitystore/business/attribute/AttributeKeyDAO.java |
260 |
daoUtil.setInt( 1, nKey );
daoUtil.executeQuery( );
AttributeKey attributeKey = null;
if ( daoUtil.next( ) )
{
attributeKey = new AttributeKey( );
int nIndex = 1;
attributeKey.setId( daoUtil.getInt( nIndex++ ) );
attributeKey.setName( daoUtil.getString( nIndex++ ) );
attributeKey.setKeyName( daoUtil.getString( nIndex++ ) );
attributeKey.setCommonSearchKeyName( daoUtil.getString( nIndex++ ) );
attributeKey.setDescription( daoUtil.getString( nIndex++ ) );
attributeKey.setKeyType( KeyType.valueOf( daoUtil.getInt( nIndex++ ) ) );
attributeKey.setCertifiable( daoUtil.getBoolean( nIndex++ ) );
attributeKey.setPivot( daoUtil.getBoolean( nIndex++ ) );
attributeKey.setKeyWeight( daoUtil.getInt( nIndex++ ) );
attributeKey.setMandatoryForCreation( daoUtil.getBoolean( nIndex++ ) );
attributeKey.setValidationRegex( daoUtil.getString( nIndex++ ) );
attributeKey.setValidationErrorMessage( daoUtil.getString( nIndex++ ) );
attributeKey.setValidationErrorMessageKey( daoUtil.getString( nIndex ) );
}
return attributeKey;
}
}
/**
* {@inheritDoc }
*/
@Override
public void delete( int nKey, Plugin plugin ) |
File |
Line |
fr/paris/lutece/plugins/identitystore/web/ServiceContractJspBean.java |
326 |
fr/paris/lutece/plugins/identitystore/web/ServiceContractJspBean.java |
493 |
_servicecontract.setAttributeCertifications( attributeCertifications.stream( ).filter( certif -> {
AttributeRight attributeRight = lstAttributeRights.stream( ).filter( atr -> atr.getAttributeKey( ).getId( ) == certif.getAttributeKey( ).getId( ) )
.findFirst( ).orElse( null );
return attributeRight != null && attributeRight.isWritable( );
} ).collect( Collectors.toList( ) ) );
final boolean validMandatoryConfig = _servicecontract.getAttributeRights( ).stream( ).filter( AttributeRight::isMandatory )
.allMatch( attributeRight -> _servicecontract.getAttributeRequirements( ).stream( )
.anyMatch( req -> Objects.equals( req.getAttributeKey( ).getKeyName( ), attributeRight.getAttributeKey( ).getKeyName( ) )
&& req.getRefCertificationLevel( ) != null && req.getRefCertificationLevel( ).getLevel( ) != null ) );
if ( !validMandatoryConfig )
{
this.addError( ERROR_SERVICECONTRACT_INVALID_MANDATORY_ATTRIBUTE, getLocale( ) );
return redirect( request, VIEW_CREATE_SERVICECONTRACT, PARAMETER_ID_CLIENTAPPLICATION, selectedClientAppId ); |
File |
Line |
fr/paris/lutece/plugins/identitystore/service/geocodes/GeocodesService.java |
749 |
fr/paris/lutece/plugins/identitystore/service/geocodes/GeocodesService.java |
1041 |
}
}
// No city code sent, checking if label was sent
else
{
if ( cityLabelToCreate != null )
{
final List<City> cities = birthdate != null
? GeoCodesService.getInstance( ).getCitiesListByNameAndDate( cityLabelToCreate.getValue( ), birthdate )
: GeoCodesService.getInstance( ).getCitiesListByName( cityLabelToCreate.getValue( ) );
if ( CollectionUtils.isEmpty( cities ) )
{
// city doesn't exist in Geocodes for provided label
final AttributeStatus attributeStatus = new AttributeStatus( );
attributeStatus.setKey( cityLabelToCreate.getKey( ) );
attributeStatus.setStatus( AttributeChangeStatus.UNKNOWN_GEOCODES_LABEL );
attributeStatus.setMessageKey( Constants.PROPERTY_ATTRIBUTE_STATUS_VALIDATION_ERROR_UNKNOWN_GEOCODES_LABEL );
attrStatusList.add( attributeStatus );
}
else
if ( cities.size( ) > 1 )
{
// Multiple cities exist in Geocodes for provided label
final AttributeStatus attributeStatus = new AttributeStatus( );
attributeStatus.setKey( cityLabelToCreate.getKey( ) );
attributeStatus.setStatus( AttributeChangeStatus.MULTIPLE_GEOCODES_RESULTS_FOR_LABEL );
attributeStatus.setMessageKey( Constants.PROPERTY_ATTRIBUTE_STATUS_VALIDATION_ERROR_GEOCODES_LABEL_MULTIPLE_RESULTS );
attrStatusList.add( attributeStatus );
}
else
{
// One city exists in Geocodes for provided label
// Create city label attribute
final AttributeStatus labelStatus = _identityAttributeService.createAttribute( cityLabelToCreate, identity, clientCode );
attrStatusList.add( labelStatus );
// create city code attribute
final String countryGeocodesCode = cities.get( 0 ).getCode( ); |
File |
Line |
fr/paris/lutece/plugins/identitystore/service/geocodes/GeocodesService.java |
694 |
fr/paris/lutece/plugins/identitystore/service/geocodes/GeocodesService.java |
853 |
}
catch( final ParseException e )
{
birthdate = null;
}
// City code to CREATE
if ( cityCodeToCreate != null )
{
final City city = birthdate != null ? GeoCodesService.getInstance( ).getCityByDateAndCode( birthdate, cityCodeToCreate.getValue( ) ).orElse( null )
: GeoCodesService.getInstance( ).getCityByCode( cityCodeToCreate.getValue( ) ).orElse( null );
if ( city == null && ( cityCodeToCreate.getCertificationLevel( ) == null || cityCodeToCreate.getCertificationLevel( ) < 600 ) )
{
// city doesn't exist in Geocodes for provided code, and code is not FC certified
final AttributeStatus attributeStatus = new AttributeStatus( );
attributeStatus.setKey( cityCodeToCreate.getKey( ) );
attributeStatus.setStatus( AttributeChangeStatus.UNKNOWN_GEOCODES_CODE );
attributeStatus.setMessageKey( Constants.PROPERTY_ATTRIBUTE_STATUS_VALIDATION_ERROR_UNKNOWN_GEOCODES_CODE );
attrStatusList.add( attributeStatus );
}
else
{
// city exists in Geocodes for provided code, or provided code is FC certified
// create city code attribute
final AttributeStatus codeStatus = _identityAttributeService.createAttribute( cityCodeToCreate, identity, clientCode );
attrStatusList.add( codeStatus );
// create city label attribute
// Geocodes label value is used, regardless if a label is provided or not
final String cityGeocodesLabel = city != null ? city.getValueMinComplete( ) : "commune inconnue"; |
File |
Line |
fr/paris/lutece/plugins/identitystore/business/attribute/AttributeKeyDAO.java |
131 |
fr/paris/lutece/plugins/identitystore/business/attribute/AttributeKeyDAO.java |
209 |
fr/paris/lutece/plugins/identitystore/business/attribute/AttributeKeyDAO.java |
267 |
fr/paris/lutece/plugins/identitystore/business/attribute/AttributeKeyDAO.java |
345 |
attributeKey = new AttributeKey( );
int nIndex = 1;
attributeKey.setId( daoUtil.getInt( nIndex++ ) );
attributeKey.setName( daoUtil.getString( nIndex++ ) );
attributeKey.setKeyName( daoUtil.getString( nIndex++ ) );
attributeKey.setCommonSearchKeyName( daoUtil.getString( nIndex++ ) );
attributeKey.setDescription( daoUtil.getString( nIndex++ ) );
attributeKey.setKeyType( KeyType.valueOf( daoUtil.getInt( nIndex++ ) ) );
attributeKey.setCertifiable( daoUtil.getBoolean( nIndex++ ) );
attributeKey.setPivot( daoUtil.getBoolean( nIndex++ ) );
attributeKey.setKeyWeight( daoUtil.getInt( nIndex++ ) );
attributeKey.setMandatoryForCreation( daoUtil.getBoolean( nIndex++ ) );
attributeKey.setValidationRegex( daoUtil.getString( nIndex++ ) );
attributeKey.setValidationErrorMessage( daoUtil.getString( nIndex++ ) );
attributeKey.setValidationErrorMessageKey( daoUtil.getString( nIndex ) ); |
File |
Line |
fr/paris/lutece/plugins/identitystore/v3/web/request/contract/ServiceContractListGetAllRequest.java |
88 |
fr/paris/lutece/plugins/identitystore/v3/web/request/contract/ServiceContractListGetRequest.java |
91 |
final List<ServiceContract> serviceContracts = ServiceContractHome.getAllServiceContractsList( );
if ( CollectionUtils.isEmpty( serviceContracts ) )
{
response.setStatus( ResponseStatusFactory.noResult( ).setMessageKey( Constants.PROPERTY_REST_ERROR_NO_SERVICE_CONTRACT_FOUND ) );
}
else
{
for ( final ServiceContract serviceContract : serviceContracts )
{
serviceContract.setAttributeRights( ServiceContractHome.selectApplicationRights( serviceContract ) );
serviceContract.setAttributeCertifications( ServiceContractHome.selectAttributeCertifications( serviceContract ) );
serviceContract.setAttributeRequirements( ServiceContractHome.selectAttributeRequirements( serviceContract ) );
// TODO amélioration générale à mener sur ce point
for ( final AttributeCertification certification : serviceContract.getAttributeCertifications( ) )
{
for ( final RefAttributeCertificationProcessus processus : certification.getRefAttributeCertificationProcessus( ) )
{
processus.setLevel( AttributeCertificationDefinitionService.instance( ).get( processus.getCode( ),
certification.getAttributeKey( ).getKeyName( ) ) );
}
}
response.getServiceContracts( ).add( DtoConverter.convertContractToDto( serviceContract ) );
}
response.setStatus( ResponseStatusFactory.ok( ).setMessageKey( Constants.PROPERTY_REST_INFO_SUCCESSFUL_OPERATION ) );
}
return response;
}
} |
File |
Line |
fr/paris/lutece/plugins/identitystore/business/identity/IdentityDAO.java |
625 |
fr/paris/lutece/plugins/identitystore/business/identity/IdentityDAO.java |
648 |
try ( final DAOUtil daoUtil = new DAOUtil( SQL_QUERY_INSERT_HISTORY, Statement.RETURN_GENERATED_KEYS, plugin ) )
{
int nIndex = 1;
daoUtil.setInt( nIndex++, identityChange.getChangeType( ).getValue( ) );
daoUtil.setString( nIndex++, identityChange.getChangeStatus( ) );
daoUtil.setString( nIndex++, identityChange.getChangeMessage( ) );
daoUtil.setString( nIndex++, identityChange.getAuthor( ).getType( ).name( ) );
daoUtil.setString( nIndex++, identityChange.getAuthor( ).getName( ) );
daoUtil.setString( nIndex++, identityChange.getClientCode( ) );
daoUtil.setString( nIndex++, identityChange.getCustomerId( ) );
daoUtil.setString( nIndex, objectMapper.writeValueAsString( identityChange.getMetadata( ) ) );
daoUtil.executeUpdate( );
}
catch( JsonProcessingException e )
{
throw new IdentityStoreException( e.getMessage( ), e );
}
}
@Override
public void addOrUpdateChangeHistory( IdentityChange identityChange, Plugin plugin ) throws IdentityStoreException |
File |
Line |
fr/paris/lutece/plugins/identitystore/service/geocodes/GeocodesService.java |
388 |
fr/paris/lutece/plugins/identitystore/service/geocodes/GeocodesService.java |
621 |
final List<Country> countries = GeoCodesService.getInstance( ).getCountriesListByName( countryLabelToCreate.getValue( ), birthdate );
if ( CollectionUtils.isEmpty( countries ) )
{
// Country doesn't exist in Geocodes for provided label
final AttributeStatus attributeStatus = new AttributeStatus( );
attributeStatus.setKey( countryLabelToCreate.getKey( ) );
attributeStatus.setStatus( AttributeChangeStatus.UNKNOWN_GEOCODES_LABEL );
attributeStatus.setMessageKey( Constants.PROPERTY_ATTRIBUTE_STATUS_VALIDATION_ERROR_UNKNOWN_GEOCODES_LABEL );
attrStatusList.add( attributeStatus );
}
else
if ( countries.size( ) > 1 )
{
// Multiple countries exist in Geocodes for provided label
final AttributeStatus attributeStatus = new AttributeStatus( );
attributeStatus.setKey( countryLabelToCreate.getKey( ) );
attributeStatus.setStatus( AttributeChangeStatus.MULTIPLE_GEOCODES_RESULTS_FOR_LABEL );
attributeStatus.setMessageKey( Constants.PROPERTY_ATTRIBUTE_STATUS_VALIDATION_ERROR_GEOCODES_LABEL_MULTIPLE_RESULTS );
attrStatusList.add( attributeStatus );
}
else
{
// One country exists in Geocodes for provided label
// Create country label attribute
final AttributeStatus labelStatus = _identityAttributeService.createAttribute( countryLabelToCreate, identity, clientCode );
attrStatusList.add( labelStatus );
// create country code attribute if it doesn't already exist in the identity
final String countryGeocodesCode = countries.get( 0 ).getCode( ); |
File |
Line |
fr/paris/lutece/plugins/identitystore/service/geocodes/GeocodesService.java |
363 |
fr/paris/lutece/plugins/identitystore/service/geocodes/GeocodesService.java |
837 |
Date birthdate;
final IdentityAttribute birthdateAttr = identity.getAttributes( ).get( Constants.PARAM_BIRTH_DATE );
try
{
if ( birthdateAttr == null )
{
final AttributeDto bdToCreate = attrToCreate.stream( ).filter( a -> a.getKey( ).equals( Constants.PARAM_BIRTH_DATE ) ).findFirst( )
.orElse( null );
birthdate = bdToCreate != null ? DateUtils.parseDate( bdToCreate.getValue( ), "dd/MM/yyyy" ) : null;
}
else
{
final AttributeDto bdToUpdate = attrToUpdate.stream( ).filter( a -> a.getKey( ).equals( Constants.PARAM_BIRTH_DATE ) ).findFirst( )
.orElse( null );
birthdate = DateUtils.parseDate( bdToUpdate != null ? bdToUpdate.getValue( ) : birthdateAttr.getValue( ), "dd/MM/yyyy" );
}
}
catch( final ParseException e )
{
birthdate = null;
}
if ( countryLabelToCreate != null ) |
File |
Line |
fr/paris/lutece/plugins/identitystore/business/duplicates/suspicions/SuspiciousIdentityDAO.java |
182 |
fr/paris/lutece/plugins/identitystore/business/duplicates/suspicions/SuspiciousIdentityDAO.java |
225 |
suspiciousIdentity = new SuspiciousIdentity( );
int nIndex = 1;
suspiciousIdentity.setId( daoUtil.getInt( nIndex++ ) );
suspiciousIdentity.setCustomerId( daoUtil.getString( nIndex++ ) );
suspiciousIdentity.setCreationDate( daoUtil.getTimestamp( nIndex++ ) );
suspiciousIdentity.setIdDuplicateRule( daoUtil.getInt( nIndex++ ) );
suspiciousIdentity.setDuplicateRuleCode( daoUtil.getString( nIndex++ ) );
final SuspiciousIdentityLock lock = new SuspiciousIdentityLock( );
suspiciousIdentity.setLock( lock );
lock.setLockEndDate( daoUtil.getTimestamp( nIndex++ ) );
if ( lock.getLockEndDate( ) != null )
{
lock.setLocked( daoUtil.getBoolean( nIndex++ ) );
lock.setAuthorType( daoUtil.getString( nIndex++ ) );
lock.setAuthorName( daoUtil.getString( nIndex ) );
}
else
{
lock.setLocked( false );
}
suspiciousIdentity.setLock( lock );
}
return suspiciousIdentity; |
File |
Line |
fr/paris/lutece/plugins/identitystore/v3/web/rs/ServiceContractRestService.java |
258 |
fr/paris/lutece/plugins/identitystore/v3/web/rs/ServiceContractRestService.java |
294 |
public Response updateServiceContract( @ApiParam( name = "Request body", value = "A service contract change Request" ) ServiceContractDto serviceContract,
@ApiParam( name = Constants.PARAM_ID_SERVICE_CONTRACT, value = "ID of the updated contract" ) @PathParam( Constants.PARAM_ID_SERVICE_CONTRACT ) Integer serviceContractId,
@ApiParam( name = Constants.PARAM_CLIENT_CODE, value = SwaggerConstants.PARAM_CLIENT_CODE_DESCRIPTION ) @HeaderParam( Constants.PARAM_CLIENT_CODE ) String clientCode,
@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 String trustedClientCode = IdentityStoreService.getTrustedClientCode( clientCode, StringUtils.EMPTY, strHeaderAppCode );
final ServiceContractUpdateRequest identityStoreRequest = new ServiceContractUpdateRequest( serviceContract, trustedClientCode, serviceContractId, |
File |
Line |
fr/paris/lutece/plugins/identitystore/v3/web/rs/ServiceContractRestService.java |
128 |
fr/paris/lutece/plugins/identitystore/v3/web/rs/ServiceContractRestService.java |
158 |
public Response getServiceContractList(
@ApiParam( name = Constants.PARAM_TARGET_CLIENT_CODE, value = SwaggerConstants.PARAM_TARGET_CLIENT_CODE_DESCRIPTION ) @PathParam( Constants.PARAM_TARGET_CLIENT_CODE ) String strTargetClientCode,
@ApiParam( name = Constants.PARAM_CLIENT_CODE, value = SwaggerConstants.PARAM_CLIENT_CODE_DESCRIPTION ) @HeaderParam( Constants.PARAM_CLIENT_CODE ) String headerClientCode,
@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 String trustedHeaderClientCode = IdentityStoreService.getTrustedClientCode( headerClientCode, StringUtils.EMPTY, strHeaderAppCode );
final ServiceContractListGetRequest request = new ServiceContractListGetRequest( strTargetClientCode, trustedHeaderClientCode, authorName, authorType ); |
File |
Line |
fr/paris/lutece/plugins/identitystore/business/duplicates/suspicions/SuspiciousIdentityDAO.java |
143 |
fr/paris/lutece/plugins/identitystore/business/duplicates/suspicions/SuspiciousIdentityDAO.java |
530 |
suspiciousIdentity = new SuspiciousIdentity( );
int nIndex = 1;
suspiciousIdentity.setId( daoUtil.getInt( nIndex++ ) );
suspiciousIdentity.setCustomerId( daoUtil.getString( nIndex++ ) );
suspiciousIdentity.setIdDuplicateRule( daoUtil.getInt( nIndex++ ) );
suspiciousIdentity.setDuplicateRuleCode( daoUtil.getString( nIndex++ ) );
final SuspiciousIdentityLock lock = new SuspiciousIdentityLock( );
suspiciousIdentity.setLock( lock );
lock.setLockEndDate( daoUtil.getTimestamp( nIndex++ ) );
if ( lock.getLockEndDate( ) != null )
{
lock.setLocked( daoUtil.getBoolean( nIndex++ ) );
lock.setAuthorType( daoUtil.getString( nIndex++ ) );
lock.setAuthorName( daoUtil.getString( nIndex ) );
}
else
{
lock.setLocked( false );
} |
File |
Line |
fr/paris/lutece/plugins/identitystore/business/rules/duplicate/DuplicateRuleDAO.java |
358 |
fr/paris/lutece/plugins/identitystore/business/rules/search/IdentitySearchRuleDAO.java |
127 |
}
}
private AttributeKey getAttributeKey( final DAOUtil daoUtil, final int offset )
{
final AttributeKey attributeKey = new AttributeKey( );
int nIndex = offset;
attributeKey.setId( daoUtil.getInt( ++nIndex ) );
attributeKey.setName( daoUtil.getString( ++nIndex ) );
attributeKey.setDescription( daoUtil.getString( ++nIndex ) );
attributeKey.setKeyName( daoUtil.getString( ++nIndex ) );
attributeKey.setKeyType( KeyType.valueOf( daoUtil.getInt( ++nIndex ) ) );
attributeKey.setKeyWeight( daoUtil.getInt( ++nIndex ) );
attributeKey.setCertifiable( daoUtil.getBoolean( ++nIndex ) );
attributeKey.setPivot( daoUtil.getBoolean( ++nIndex ) );
attributeKey.setCommonSearchKeyName( daoUtil.getString( ++nIndex ) ); |
File |
Line |
fr/paris/lutece/plugins/identitystore/v3/web/rs/IdentityStoreRestService.java |
189 |
fr/paris/lutece/plugins/identitystore/v3/web/rs/IdentityStoreRestService.java |
353 |
public Response createIdentity( @ApiParam( name = "Request body", value = "An Identity Change Request" ) IdentityChangeRequest identityChangeRequest,
@ApiParam( name = Constants.PARAM_CLIENT_CODE, value = SwaggerConstants.PARAM_CLIENT_CODE_DESCRIPTION ) @HeaderParam( Constants.PARAM_CLIENT_CODE ) String clientCode,
@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 String trustedClientCode = IdentityStoreService.getTrustedClientCode( clientCode, StringUtils.EMPTY, strHeaderAppCode );
final IdentityStoreCreateRequest identityStoreRequest = new IdentityStoreCreateRequest( identityChangeRequest, trustedClientCode, authorName, |
File |
Line |
fr/paris/lutece/plugins/identitystore/v3/web/rs/IdentityStoreRestService.java |
253 |
fr/paris/lutece/plugins/identitystore/v3/web/rs/IdentityStoreRestService.java |
283 |
public Response mergeIdentities( @ApiParam( name = "Request body", value = "An Identity Merge Request" ) IdentityMergeRequest identityMergeRequest,
@ApiParam( name = Constants.PARAM_CLIENT_CODE, value = SwaggerConstants.PARAM_CLIENT_CODE_DESCRIPTION ) @HeaderParam( Constants.PARAM_CLIENT_CODE ) String clientCode,
@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 String trustedClientCode = IdentityStoreService.getTrustedClientCode( clientCode, StringUtils.EMPTY, strHeaderAppCode );
final IdentityStoreMergeRequest identityStoreRequest = new IdentityStoreMergeRequest( identityMergeRequest, trustedClientCode, authorName, authorType ); |
File |
Line |
fr/paris/lutece/plugins/identitystore/v3/web/rs/IdentityStoreRestService.java |
222 |
fr/paris/lutece/plugins/identitystore/v3/web/rs/IdentityStoreRestService.java |
417 |
@ApiParam( name = Constants.PARAM_ID_CUSTOMER, value = "Customer ID of the updated identity" ) @PathParam( Constants.PARAM_ID_CUSTOMER ) String strCustomerId,
@ApiParam( name = Constants.PARAM_CLIENT_CODE, value = SwaggerConstants.PARAM_CLIENT_CODE_DESCRIPTION ) @HeaderParam( Constants.PARAM_CLIENT_CODE ) String clientCode,
@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 String trustedClientCode = IdentityStoreService.getTrustedClientCode( clientCode, StringUtils.EMPTY, strHeaderAppCode );
final IdentityStoreUpdateRequest identityStoreRequest = new IdentityStoreUpdateRequest( strCustomerId, identityChangeRequest, trustedClientCode, |
File |
Line |
fr/paris/lutece/plugins/identitystore/business/contract/AttributeCertificationDAO.java |
280 |
fr/paris/lutece/plugins/identitystore/business/contract/AttributeRequirementDAO.java |
273 |
AttributeCertification attributeCertification = new AttributeCertification( );
AttributeKey attributeKey = new AttributeKey( );
int nIndex = 1;
attributeKey.setId( daoUtil.getInt( nIndex++ ) );
attributeKey.setName( daoUtil.getString( nIndex++ ) );
attributeKey.setKeyName( daoUtil.getString( nIndex++ ) );
attributeKey.setCommonSearchKeyName( daoUtil.getString( nIndex++ ) );
attributeKey.setDescription( daoUtil.getString( nIndex++ ) );
attributeKey.setKeyType( KeyType.valueOf( daoUtil.getInt( nIndex++ ) ) );
attributeKey.setMandatoryForCreation( daoUtil.getBoolean( nIndex++ ) );
attributeKey.setValidationRegex( daoUtil.getString( nIndex++ ) );
attributeKey.setValidationErrorMessage( daoUtil.getString( nIndex++ ) );
attributeKey.setValidationErrorMessageKey( daoUtil.getString( nIndex ) ); |
File |
Line |
fr/paris/lutece/plugins/identitystore/v3/web/rs/ClientRestService.java |
82 |
fr/paris/lutece/plugins/identitystore/v3/web/rs/ClientRestService.java |
111 |
@ApiParam( name = Constants.PARAM_CLIENT_CODE, value = SwaggerConstants.PARAM_CLIENT_CODE_DESCRIPTION ) @HeaderParam( Constants.PARAM_CLIENT_CODE ) String clientCode,
@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 String trustedClientCode = IdentityStoreService.getTrustedClientCode( clientCode, StringUtils.EMPTY, strHeaderAppCode );
final ClientsGetRequest request = new ClientsGetRequest( trustedClientCode, null, authorName, authorType ); |
File |
Line |
fr/paris/lutece/plugins/identitystore/business/identity/IdentityDAO.java |
203 |
fr/paris/lutece/plugins/identitystore/business/identity/IdentityDAO.java |
320 |
identity.setId( daoUtil.getInt( nIndex++ ) );
identity.setConnectionId( daoUtil.getString( nIndex++ ) );
identity.setCustomerId( daoUtil.getString( nIndex++ ) );
identity.setDeleted( daoUtil.getBoolean( nIndex++ ) );
identity.setMerged( daoUtil.getBoolean( nIndex++ ) );
identity.setMasterIdentityId( daoUtil.getInt( nIndex++ ) );
identity.setCreationDate( daoUtil.getTimestamp( nIndex++ ) );
identity.setLastUpdateDate( daoUtil.getTimestamp( nIndex++ ) );
identity.setMergeDate( daoUtil.getTimestamp( nIndex++ ) );
identity.setMonParisActive( daoUtil.getBoolean( nIndex++ ) );
identity.setExpirationDate( daoUtil.getTimestamp( nIndex ) );
} |
File |
Line |
fr/paris/lutece/plugins/identitystore/service/identity/IdentityService.java |
438 |
fr/paris/lutece/plugins/identitystore/service/identity/IdentityService.java |
626 |
response.setLastUpdateDate( identity.getLastUpdateDate( ) );
final boolean allAttributesCreatedOrUpdated = attrStatusList.stream( ).map( AttributeStatus::getStatus )
.allMatch( status -> status.getType( ) == AttributeChangeStatusType.SUCCESS );
final ResponseStatus status = allAttributesCreatedOrUpdated ? ResponseStatusFactory.success( ) : ResponseStatusFactory.incompleteSuccess( );
final String msgKey;
if ( Collections.disjoint( AttributeChangeStatus.getSuccessStatuses( ),
attrStatusList.stream( ).map( AttributeStatus::getStatus ).collect( Collectors.toList( ) ) ) )
{
// If there was no attribute change, send back a specific message key
msgKey = Constants.PROPERTY_REST_INFO_NO_ATTRIBUTE_CHANGE;
}
else
{
msgKey = Constants.PROPERTY_REST_INFO_SUCCESSFUL_OPERATION;
}
response.setStatus( status.setAttributeStatuses( attrStatusList ).setMessageKey( msgKey ) );
TransactionManager.commitTransaction( null );
/* Historique des modifications */
for ( final AttributeStatus attributeStatus : attrStatusList ) |
File |
Line |
fr/paris/lutece/plugins/identitystore/service/geocodes/GeocodesService.java |
724 |
fr/paris/lutece/plugins/identitystore/service/geocodes/GeocodesService.java |
885 |
final AttributeChangeStatus labelStatus;
final String attrStatusMessageKey;
if ( cityLabelToCreate == null || cityLabelToCreate.getValue( ).equals( cityGeocodesLabel ) )
{
labelStatus = AttributeChangeStatus.CREATED;
attrStatusMessageKey = Constants.PROPERTY_ATTRIBUTE_STATUS_CREATED;
}
else
{
labelStatus = AttributeChangeStatus.OVERRIDDEN_GEOCODES_LABEL;
attrStatusMessageKey = Constants.PROPERTY_ATTRIBUTE_STATUS_GEOCODES_LABEL_OVERRIDDEN;
}
if ( cityLabelToCreate == null )
{
cityLabelToCreate = new AttributeDto( );
cityLabelToCreate.setKey( Constants.PARAM_BIRTH_PLACE );
}
cityLabelToCreate.setValue( cityGeocodesLabel );
cityLabelToCreate.setCertifier( cityCodeToCreate.getCertifier( ) );
cityLabelToCreate.setCertificationDate( cityCodeToCreate.getCertificationDate( ) );
final AttributeStatus attributeStatus = _identityAttributeService.createAttribute( cityLabelToCreate, identity, clientCode );
attributeStatus.setStatus( labelStatus );
attributeStatus.setMessageKey( attrStatusMessageKey );
attrStatusList.add( attributeStatus );
} |
File |
Line |
fr/paris/lutece/plugins/identitystore/business/rules/duplicate/DuplicateRuleDAO.java |
85 |
fr/paris/lutece/plugins/identitystore/business/rules/duplicate/DuplicateRuleDAO.java |
223 |
try ( final DAOUtil daoUtil = new DAOUtil( SQL_QUERY_INSERT_RULE, Statement.RETURN_GENERATED_KEYS, plugin ) )
{
int nIndex = 0;
daoUtil.setString( ++nIndex, duplicateRule.getName( ) );
daoUtil.setString( ++nIndex, duplicateRule.getCode( ) );
daoUtil.setString( ++nIndex, duplicateRule.getDescription( ) );
daoUtil.setInt( ++nIndex, duplicateRule.getNbFilledAttributes( ) );
daoUtil.setInt( ++nIndex, duplicateRule.getNbEqualAttributes( ) );
daoUtil.setInt( ++nIndex, duplicateRule.getNbMissingAttributes( ) );
daoUtil.setInt( ++nIndex, duplicateRule.getPriority( ) );
daoUtil.setBoolean( ++nIndex, duplicateRule.isActive( ) );
daoUtil.setBoolean( ++nIndex, duplicateRule.isDaemon( ) );
daoUtil.setInt( ++nIndex, duplicateRule.getDetectionLimit( ) ); |
File |
Line |
fr/paris/lutece/plugins/identitystore/business/attribute/AttributeKeyDAO.java |
97 |
fr/paris/lutece/plugins/identitystore/business/attribute/AttributeKeyDAO.java |
175 |
int nIndex = 1;
daoUtil.setInt( nIndex++, attributeKey.getId( ) );
daoUtil.setString( nIndex++, attributeKey.getName( ) );
daoUtil.setString( nIndex++, attributeKey.getKeyName( ) );
daoUtil.setString( nIndex++, attributeKey.getCommonSearchKeyName( ) );
daoUtil.setString( nIndex++, attributeKey.getDescription( ) );
daoUtil.setInt( nIndex++, attributeKey.getKeyType( ).getId( ) );
daoUtil.setBoolean( nIndex++, attributeKey.getCertifiable( ) );
daoUtil.setBoolean( nIndex++, attributeKey.getPivot( ) );
daoUtil.setInt( nIndex++, attributeKey.getKeyWeight( ) );
daoUtil.setString( nIndex++, attributeKey.getValidationRegex( ) ); |
File |
Line |
fr/paris/lutece/plugins/identitystore/business/contract/AttributeCertificationDAO.java |
230 |
fr/paris/lutece/plugins/identitystore/business/contract/AttributeRequirementDAO.java |
222 |
fr/paris/lutece/plugins/identitystore/business/contract/ServiceContractDAO.java |
362 |
fr/paris/lutece/plugins/identitystore/business/referentiel/RefAttributeCertificationLevelDAO.java |
236 |
fr/paris/lutece/plugins/identitystore/business/referentiel/RefAttributeCertificationProcessusDAO.java |
209 |
fr/paris/lutece/plugins/identitystore/business/referentiel/RefCertificationLevelDAO.java |
214 |
List<AttributeCertification> attributeCertificationList = new ArrayList<>( );
StringBuilder builder = new StringBuilder( );
if ( !listIds.isEmpty( ) )
{
for ( int i = 0; i < listIds.size( ); i++ )
{
builder.append( "?," );
}
String placeHolders = builder.deleteCharAt( builder.length( ) - 1 ).toString( );
String stmt = SQL_QUERY_SELECTALL_BY_IDS + placeHolders + ")";
try ( final DAOUtil daoUtil = new DAOUtil( stmt, plugin ) )
{
int index = 1;
for ( Integer n : listIds )
{
daoUtil.setInt( index++, n );
}
daoUtil.executeQuery( );
while ( daoUtil.next( ) )
{ |
File |
Line |
fr/paris/lutece/plugins/identitystore/v3/web/rs/ClientRestService.java |
81 |
fr/paris/lutece/plugins/identitystore/v3/web/rs/ReferentielRestService.java |
85 |
fr/paris/lutece/plugins/identitystore/v3/web/rs/ServiceContractRestService.java |
98 |
public Response getClients(
@ApiParam( name = Constants.PARAM_CLIENT_CODE, value = SwaggerConstants.PARAM_CLIENT_CODE_DESCRIPTION ) @HeaderParam( Constants.PARAM_CLIENT_CODE ) String clientCode,
@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 String trustedClientCode = IdentityStoreService.getTrustedClientCode( clientCode, StringUtils.EMPTY, strHeaderAppCode );
final ClientsGetRequest request = new ClientsGetRequest( trustedClientCode, null, authorName, authorType ); |
File |
Line |
fr/paris/lutece/plugins/identitystore/v3/web/rs/ClientRestService.java |
110 |
fr/paris/lutece/plugins/identitystore/v3/web/rs/ClientRestService.java |
170 |
fr/paris/lutece/plugins/identitystore/v3/web/rs/IdentityStoreRestService.java |
189 |
fr/paris/lutece/plugins/identitystore/v3/web/rs/IdentityStoreRestService.java |
222 |
fr/paris/lutece/plugins/identitystore/v3/web/rs/IdentityStoreRestService.java |
253 |
fr/paris/lutece/plugins/identitystore/v3/web/rs/IdentityStoreRestService.java |
283 |
fr/paris/lutece/plugins/identitystore/v3/web/rs/IdentityStoreRestService.java |
354 |
fr/paris/lutece/plugins/identitystore/v3/web/rs/IdentityStoreRestService.java |
417 |
fr/paris/lutece/plugins/identitystore/v3/web/rs/ServiceContractRestService.java |
223 |
fr/paris/lutece/plugins/identitystore/v3/web/rs/ServiceContractRestService.java |
259 |
fr/paris/lutece/plugins/identitystore/v3/web/rs/ServiceContractRestService.java |
295 |
@ApiParam( name = Constants.PARAM_APPLICATION_CODE, value = SwaggerConstants.CLIENT_APPLICATION_CODE_DESCRIPTION ) @PathParam( Constants.PARAM_APPLICATION_CODE ) String applicationCode,
@ApiParam( name = Constants.PARAM_CLIENT_CODE, value = SwaggerConstants.PARAM_CLIENT_CODE_DESCRIPTION ) @HeaderParam( Constants.PARAM_CLIENT_CODE ) String clientCode,
@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 String trustedClientCode = IdentityStoreService.getTrustedClientCode( clientCode, StringUtils.EMPTY, strHeaderAppCode );
final ClientsGetRequest request = new ClientsGetRequest( trustedClientCode, applicationCode, authorName, authorType ); |
File |
Line |
fr/paris/lutece/plugins/identitystore/v3/web/rs/HistoryRestService.java |
91 |
fr/paris/lutece/plugins/identitystore/v3/web/rs/HistoryRestService.java |
122 |
fr/paris/lutece/plugins/identitystore/v3/web/rs/IdentityStoreRestService.java |
151 |
fr/paris/lutece/plugins/identitystore/v3/web/rs/IdentityStoreRestService.java |
386 |
fr/paris/lutece/plugins/identitystore/v3/web/rs/IdentityStoreRestService.java |
442 |
@ApiParam( name = Constants.PARAM_ID_CUSTOMER, value = "Customer ID of the requested identity" ) @PathParam( Constants.PARAM_ID_CUSTOMER ) String strCustomerId,
@ApiParam( name = Constants.PARAM_CLIENT_CODE, value = SwaggerConstants.PARAM_CLIENT_CODE_DESCRIPTION ) @HeaderParam( Constants.PARAM_CLIENT_CODE ) String strHeaderClientAppCode,
@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 String strClientAppCode = IdentityStoreService.getTrustedClientCode( strHeaderClientAppCode, StringUtils.EMPTY, strHeaderAppCode );
final IdentityStoreHistoryGetRequest request = new IdentityStoreHistoryGetRequest( strClientAppCode, strCustomerId, authorName, authorType ); |
File |
Line |
fr/paris/lutece/plugins/identitystore/v3/web/rs/ReferentielRestService.java |
111 |
fr/paris/lutece/plugins/identitystore/v3/web/rs/ReferentielRestService.java |
137 |
public Response getAllLevels(
@ApiParam( name = Constants.PARAM_CLIENT_CODE, value = SwaggerConstants.PARAM_CLIENT_CODE_DESCRIPTION ) @HeaderParam( Constants.PARAM_CLIENT_CODE ) String strClientCode,
@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 String trustedClientCode = IdentityStoreService.getTrustedClientCode( strClientCode, StringUtils.EMPTY, strHeaderAppCode );
final LevelListGetRequest request = new LevelListGetRequest( trustedClientCode, authorName, authorType ); |
File |
Line |
fr/paris/lutece/plugins/identitystore/v3/web/rs/ClientRestService.java |
82 |
fr/paris/lutece/plugins/identitystore/v3/web/rs/ClientRestService.java |
171 |
fr/paris/lutece/plugins/identitystore/v3/web/rs/IdentityStoreRestService.java |
190 |
fr/paris/lutece/plugins/identitystore/v3/web/rs/IdentityStoreRestService.java |
223 |
fr/paris/lutece/plugins/identitystore/v3/web/rs/IdentityStoreRestService.java |
254 |
fr/paris/lutece/plugins/identitystore/v3/web/rs/IdentityStoreRestService.java |
284 |
fr/paris/lutece/plugins/identitystore/v3/web/rs/IdentityStoreRestService.java |
355 |
fr/paris/lutece/plugins/identitystore/v3/web/rs/IdentityStoreRestService.java |
418 |
fr/paris/lutece/plugins/identitystore/v3/web/rs/ServiceContractRestService.java |
224 |
fr/paris/lutece/plugins/identitystore/v3/web/rs/ServiceContractRestService.java |
260 |
fr/paris/lutece/plugins/identitystore/v3/web/rs/ServiceContractRestService.java |
296 |
@ApiParam( name = Constants.PARAM_CLIENT_CODE, value = SwaggerConstants.PARAM_CLIENT_CODE_DESCRIPTION ) @HeaderParam( Constants.PARAM_CLIENT_CODE ) String clientCode,
@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 String trustedClientCode = IdentityStoreService.getTrustedClientCode( clientCode, StringUtils.EMPTY, strHeaderAppCode );
final ClientsGetRequest request = new ClientsGetRequest( trustedClientCode, null, authorName, authorType ); |
File |
Line |
fr/paris/lutece/plugins/identitystore/v3/web/rs/ClientRestService.java |
111 |
fr/paris/lutece/plugins/identitystore/v3/web/rs/ReferentielRestService.java |
86 |
fr/paris/lutece/plugins/identitystore/v3/web/rs/ServiceContractRestService.java |
99 |
@ApiParam( name = Constants.PARAM_CLIENT_CODE, value = SwaggerConstants.PARAM_CLIENT_CODE_DESCRIPTION ) @HeaderParam( Constants.PARAM_CLIENT_CODE ) String clientCode,
@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 String trustedClientCode = IdentityStoreService.getTrustedClientCode( clientCode, StringUtils.EMPTY, strHeaderAppCode );
final ClientsGetRequest request = new ClientsGetRequest( trustedClientCode, applicationCode, authorName, authorType ); |
File |
Line |
fr/paris/lutece/plugins/identitystore/v3/web/rs/IdentityStoreRestService.java |
316 |
fr/paris/lutece/plugins/identitystore/v3/web/rs/ReferentielRestService.java |
112 |
fr/paris/lutece/plugins/identitystore/v3/web/rs/ReferentielRestService.java |
138 |
@ApiParam( name = Constants.PARAM_CLIENT_CODE, value = SwaggerConstants.PARAM_CLIENT_CODE_DESCRIPTION ) @HeaderParam( Constants.PARAM_CLIENT_CODE ) String strClientCode,
@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 String trustedClientCode = IdentityStoreService.getTrustedClientCode( strClientCode, StringUtils.EMPTY, strHeaderAppCode );
final IdentityStoreDeleteRequest identityStoreRequest = new IdentityStoreDeleteRequest( strCustomerId, trustedClientCode, authorName, authorType ); |
File |
Line |
fr/paris/lutece/plugins/identitystore/service/geocodes/GeocodesService.java |
877 |
fr/paris/lutece/plugins/identitystore/service/geocodes/GeocodesService.java |
980 |
final AttributeStatus codeStatus = _identityAttributeService.createAttribute( cityCodeToCreate, identity, clientCode );
attrStatusList.add( codeStatus );
// create city label attribute if it doesn't already exist in the identity
// Geocodes label value is used, regardless if a label is provided or not
final String cityGeocodesLabel = city != null ? city.getValueMinComplete( ) : "commune inconnue";
if ( !identity.getAttributes( ).containsKey( Constants.PARAM_BIRTH_PLACE ) )
{
final AttributeChangeStatus labelStatus;
final String attrStatusMessageKey;
if ( cityLabelToCreate == null || cityLabelToCreate.getValue( ).equals( cityGeocodesLabel ) )
{
labelStatus = AttributeChangeStatus.CREATED;
attrStatusMessageKey = Constants.PROPERTY_ATTRIBUTE_STATUS_CREATED;
}
else
{
labelStatus = AttributeChangeStatus.OVERRIDDEN_GEOCODES_LABEL;
attrStatusMessageKey = Constants.PROPERTY_ATTRIBUTE_STATUS_GEOCODES_LABEL_OVERRIDDEN;
}
if ( cityLabelToCreate == null )
{
cityLabelToCreate = new AttributeDto( );
cityLabelToCreate.setKey( Constants.PARAM_BIRTH_PLACE );
}
cityLabelToCreate.setValue( cityGeocodesLabel );
cityLabelToCreate.setCertifier( cityCodeToCreate.getCertifier( ) ); |
File |
Line |
fr/paris/lutece/plugins/identitystore/service/geocodes/GeocodesService.java |
195 |
fr/paris/lutece/plugins/identitystore/service/geocodes/GeocodesService.java |
296 |
final AttributeStatus codeStatus = _identityAttributeService.createAttribute( countryCodeToCreate, identity, clientCode );
attrStatusList.add( codeStatus );
// create country label attribute if it doesn't already exist in the identity
// Geocodes label value is used, regardless if a label is provided or not
final String countryGeocodesLabel = country.getValue( );
if ( !identity.getAttributes( ).containsKey( Constants.PARAM_BIRTH_COUNTRY ) )
{
final AttributeChangeStatus labelStatus;
final String LabelStatusMessageKey;
if ( countryLabelToCreate == null || countryLabelToCreate.getValue( ).equals( countryGeocodesLabel ) )
{
labelStatus = AttributeChangeStatus.CREATED;
LabelStatusMessageKey = Constants.PROPERTY_ATTRIBUTE_STATUS_CREATED;
}
else
{
labelStatus = AttributeChangeStatus.OVERRIDDEN_GEOCODES_LABEL;
LabelStatusMessageKey = Constants.PROPERTY_ATTRIBUTE_STATUS_GEOCODES_LABEL_OVERRIDDEN;
}
if ( countryLabelToCreate == null )
{
countryLabelToCreate = new AttributeDto( );
countryLabelToCreate.setKey( Constants.PARAM_BIRTH_COUNTRY );
}
countryLabelToCreate.setValue( countryGeocodesLabel );
countryLabelToCreate.setCertifier( countryCodeToCreate.getCertifier( ) ); |
File |
Line |
fr/paris/lutece/plugins/identitystore/business/duplicates/suspicions/SuspiciousIdentityDAO.java |
147 |
fr/paris/lutece/plugins/identitystore/business/duplicates/suspicions/SuspiciousIdentityDAO.java |
187 |
fr/paris/lutece/plugins/identitystore/business/duplicates/suspicions/SuspiciousIdentityDAO.java |
231 |
fr/paris/lutece/plugins/identitystore/business/duplicates/suspicions/SuspiciousIdentityDAO.java |
534 |
suspiciousIdentity.setCustomerId( daoUtil.getString( nIndex++ ) );
suspiciousIdentity.setIdDuplicateRule( daoUtil.getInt( nIndex++ ) );
suspiciousIdentity.setDuplicateRuleCode( daoUtil.getString( nIndex++ ) );
final SuspiciousIdentityLock lock = new SuspiciousIdentityLock( );
suspiciousIdentity.setLock( lock );
lock.setLockEndDate( daoUtil.getTimestamp( nIndex++ ) );
if ( lock.getLockEndDate( ) != null )
{
lock.setLocked( daoUtil.getBoolean( nIndex++ ) );
lock.setAuthorType( daoUtil.getString( nIndex++ ) );
lock.setAuthorName( daoUtil.getString( nIndex ) );
}
else
{
lock.setLocked( false );
} |
File |
Line |
fr/paris/lutece/plugins/identitystore/service/geocodes/GeocodesService.java |
175 |
fr/paris/lutece/plugins/identitystore/service/geocodes/GeocodesService.java |
551 |
attrToUpdate.remove( countryLabelToUpdate );
}
// Country code to CREATE
if ( countryCodeToCreate != null )
{
final Country country = GeoCodesService.getInstance( ).getCountryByCode( countryCodeToCreate.getValue( ) ).orElse( null );
if ( country == null )
{
// Country doesn't exist in Geocodes for provided code
final AttributeStatus attributeStatus = new AttributeStatus( );
attributeStatus.setKey( countryCodeToCreate.getKey( ) );
attributeStatus.setStatus( AttributeChangeStatus.UNKNOWN_GEOCODES_CODE );
attributeStatus.setMessageKey( Constants.PROPERTY_ATTRIBUTE_STATUS_VALIDATION_ERROR_UNKNOWN_GEOCODES_CODE );
attrStatusList.add( attributeStatus );
}
else
{
// Country exists in Geocodes for provided code
// create country code attribute
final AttributeStatus codeStatus = _identityAttributeService.createAttribute( countryCodeToCreate, identity, clientCode );
attrStatusList.add( codeStatus );
// create country label attribute if it doesn't already exist in the identity
// Geocodes label value is used, regardless if a label is provided or not
final String countryGeocodesLabel = country.getValue( ); |
File |
Line |
fr/paris/lutece/plugins/identitystore/v3/web/rs/ClientRestService.java |
139 |
fr/paris/lutece/plugins/identitystore/v3/web/rs/ServiceContractRestService.java |
129 |
fr/paris/lutece/plugins/identitystore/v3/web/rs/ServiceContractRestService.java |
159 |
@ApiParam( name = Constants.PARAM_TARGET_CLIENT_CODE, value = SwaggerConstants.PARAM_TARGET_CLIENT_CODE_DESCRIPTION ) @PathParam( Constants.PARAM_TARGET_CLIENT_CODE ) String targetClientCode,
@ApiParam( name = Constants.PARAM_CLIENT_CODE, value = SwaggerConstants.PARAM_CLIENT_CODE_DESCRIPTION ) @HeaderParam( Constants.PARAM_CLIENT_CODE ) String headerClientCode,
@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 String trustedCode = IdentityStoreService.getTrustedClientCode( headerClientCode, StringUtils.EMPTY, strHeaderAppCode ); |
File |
Line |
fr/paris/lutece/plugins/identitystore/v3/web/request/identity/IdentityStoreCreateRequest.java |
74 |
fr/paris/lutece/plugins/identitystore/v3/web/request/identity/IdentityStoreUpdateRequest.java |
84 |
IdentityRequestValidator.instance( ).checkIdentityChange( _identityChangeRequest, false );
}
@Override
public IdentityChangeResponse doSpecificRequest( ) throws IdentityStoreException
{
// quality checks
final IdentityChangeResponse response = ServiceContractService.instance( ).validateIdentityChange( _identityChangeRequest, _strClientCode );
if ( ResponseStatusFactory.failure( ).equals( response.getStatus( ) ) )
{
return response;
}
// data content checks
final List<AttributeStatus> formatStatuses = IdentityAttributeFormatterService.instance( )
.formatIdentityChangeRequestAttributeValues( _identityChangeRequest );
IdentityAttributeValidationService.instance( ).validateIdentityAttributeValues( _identityChangeRequest.getIdentity( ), response );
if ( ResponseStatusFactory.failure( ).equals( response.getStatus( ) ) )
{
return response;
} |
File |
Line |
fr/paris/lutece/plugins/identitystore/business/duplicates/suspicions/SuspiciousIdentityDAO.java |
412 |
fr/paris/lutece/plugins/identitystore/business/duplicates/suspicions/SuspiciousIdentityDAO.java |
440 |
daoUtil.executeQuery( );
while ( daoUtil.next( ) )
{
final ExcludedIdentities excludedIdentities = new ExcludedIdentities( );
int nIndex = 1;
excludedIdentities.setFirstCustomerId( daoUtil.getString( nIndex++ ) );
excludedIdentities.setSecondCustomerId( daoUtil.getString( nIndex++ ) );
excludedIdentities.setExclusionDate( daoUtil.getTimestamp( nIndex++ ) );
excludedIdentities.setAuthorType( daoUtil.getString( nIndex++ ) );
excludedIdentities.setAuthorName( daoUtil.getString( nIndex ) );
excludedIdentitiesList.add( excludedIdentities );
}
return excludedIdentitiesList;
}
}
@Override
public List<ExcludedIdentities> selectExcludedIdentitiesList( final String customerId, Plugin plugin ) |
File |
Line |
fr/paris/lutece/plugins/identitystore/v3/web/request/contract/ServiceContractCreateRequest.java |
93 |
fr/paris/lutece/plugins/identitystore/v3/web/request/contract/ServiceContractUpdateRequest.java |
110 |
final ServiceContract serviceContract = ServiceContractService.instance( ).create( DtoConverter.convertDtoToContract( _serviceContractDto ),
clientApplication.getId( ) );
// TODO amélioration générale à mener sur ce point
for ( final AttributeCertification certification : serviceContract.getAttributeCertifications( ) )
{
for ( final RefAttributeCertificationProcessus processus : certification.getRefAttributeCertificationProcessus( ) )
{
processus.setLevel(
AttributeCertificationDefinitionService.instance( ).get( processus.getCode( ), certification.getAttributeKey( ).getKeyName( ) ) );
}
}
response.setServiceContract( DtoConverter.convertContractToDto( serviceContract ) );
response.setStatus( ResponseStatusFactory.success( ).setMessageKey( Constants.PROPERTY_REST_INFO_SUCCESSFUL_OPERATION ) );
} |