Search in sources :

Example 51 with PropertyDTO

use of org.wso2.carbon.identity.user.store.configuration.stub.dto.PropertyDTO in project identity-api-server by wso2.

the class ServerUserStoreService method patchUserStoreProperties.

/**
 * To construct properties list for patch request.
 *
 * @param propertyDTOS array of {@link PropertyDTO}
 * @return List<AddUserStorePropertiesRes>
 */
private List<AddUserStorePropertiesRes> patchUserStoreProperties(PropertyDTO[] propertyDTOS) {
    List<AddUserStorePropertiesRes> propertiesToAdd = new ArrayList<>();
    for (PropertyDTO propertyDTO : propertyDTOS) {
        AddUserStorePropertiesRes patchUserStoreProperties = new AddUserStorePropertiesRes();
        patchUserStoreProperties.setName(propertyDTO.getName());
        patchUserStoreProperties.setValue(propertyDTO.getValue());
        propertiesToAdd.add(patchUserStoreProperties);
    }
    return propertiesToAdd;
}
Also used : ArrayList(java.util.ArrayList) AddUserStorePropertiesRes(org.wso2.carbon.identity.api.server.userstore.v1.model.AddUserStorePropertiesRes) PropertyDTO(org.wso2.carbon.identity.user.store.configuration.dto.PropertyDTO)

Example 52 with PropertyDTO

use of org.wso2.carbon.identity.user.store.configuration.stub.dto.PropertyDTO in project identity-api-server by wso2.

the class ServerUserStoreService method generatePropertiesWithUniqueIDProperty.

/**
 * Construct PropertyDTO array with UniqueID.
 *
 * @param propertiesToAdd Array list of properties.
 * @return PropertyDTO[].
 */
private PropertyDTO[] generatePropertiesWithUniqueIDProperty(ArrayList<PropertyDTO> propertiesToAdd) {
    PropertyDTO propertyDTO = new PropertyDTO();
    propertyDTO.setName("UniqueID");
    propertyDTO.setValue(UUID.randomUUID().toString());
    propertiesToAdd.add(propertyDTO);
    return propertiesToAdd.toArray(new PropertyDTO[0]);
}
Also used : PropertyDTO(org.wso2.carbon.identity.user.store.configuration.dto.PropertyDTO)

Aggregations

ArrayList (java.util.ArrayList)23 PropertyDTO (org.wso2.carbon.identity.user.endpoint.dto.PropertyDTO)18 PropertyDTO (org.wso2.carbon.identity.user.store.configuration.dto.PropertyDTO)10 PropertyDTO (org.wso2.carbon.identity.user.store.configuration.stub.dto.PropertyDTO)10 UserStoreDTO (org.wso2.carbon.identity.user.store.configuration.stub.dto.UserStoreDTO)9 File (java.io.File)7 Test (org.testng.annotations.Test)7 H2DataBaseManager (org.wso2.carbon.automation.test.utils.dbutils.H2DataBaseManager)6 ResendCodeRequestDTO (org.wso2.carbon.identity.user.endpoint.dto.ResendCodeRequestDTO)6 ISIntegrationTest (org.wso2.identity.integration.common.utils.ISIntegrationTest)6 Property (org.wso2.carbon.user.api.Property)5 AddUserStorePropertiesRes (org.wso2.carbon.identity.api.server.userstore.v1.model.AddUserStorePropertiesRes)3 PropertyDTO (org.wso2.carbon.identity.recovery.endpoint.dto.PropertyDTO)3 ErrorDTO (org.wso2.carbon.identity.user.endpoint.dto.ErrorDTO)3 UserStoreDTO (org.wso2.carbon.identity.user.store.configuration.dto.UserStoreDTO)3 JDBCUserStoreManager (org.wso2.carbon.user.core.jdbc.JDBCUserStoreManager)3 PublisherDataHolder (org.wso2.carbon.identity.entitlement.stub.dto.PublisherDataHolder)2 PublisherPropertyDTO (org.wso2.carbon.identity.entitlement.stub.dto.PublisherPropertyDTO)2 IdentityRecoveryException (org.wso2.carbon.identity.recovery.IdentityRecoveryException)2 NotificationResponseBean (org.wso2.carbon.identity.recovery.bean.NotificationResponseBean)2