target
stringlengths
20
113k
src_fm
stringlengths
11
86.3k
src_fm_fc
stringlengths
21
86.4k
src_fm_fc_co
stringlengths
30
86.4k
src_fm_fc_ms
stringlengths
42
86.8k
src_fm_fc_ms_ff
stringlengths
43
86.8k
@Test public void createConfigurationNullTest() throws Exception { DefaultConfigurationAccessor configurationAccessor = new DefaultConfigurationAccessor(null, null, null, null, null, null, null, null); try { configurationAccessor.createConfiguration(null, null, null); fail("Null descriptorKey, context, and configuredFi...
@Override public ConfigurationModel createConfiguration(DescriptorKey descriptorKey, ConfigContextEnum context, Collection<ConfigurationFieldModel> configuredFields) throws AlertDatabaseConstraintException { if (null == descriptorKey || StringUtils.isBlank(descriptorKey.getUniversalKey())) { throw new AlertDatabaseCons...
DefaultConfigurationAccessor implements ConfigurationAccessor { @Override public ConfigurationModel createConfiguration(DescriptorKey descriptorKey, ConfigContextEnum context, Collection<ConfigurationFieldModel> configuredFields) throws AlertDatabaseConstraintException { if (null == descriptorKey || StringUtils.isBlank...
DefaultConfigurationAccessor implements ConfigurationAccessor { @Override public ConfigurationModel createConfiguration(DescriptorKey descriptorKey, ConfigContextEnum context, Collection<ConfigurationFieldModel> configuredFields) throws AlertDatabaseConstraintException { if (null == descriptorKey || StringUtils.isBlank...
DefaultConfigurationAccessor implements ConfigurationAccessor { @Override public ConfigurationModel createConfiguration(DescriptorKey descriptorKey, ConfigContextEnum context, Collection<ConfigurationFieldModel> configuredFields) throws AlertDatabaseConstraintException { if (null == descriptorKey || StringUtils.isBlank...
DefaultConfigurationAccessor implements ConfigurationAccessor { @Override public ConfigurationModel createConfiguration(DescriptorKey descriptorKey, ConfigContextEnum context, Collection<ConfigurationFieldModel> configuredFields) throws AlertDatabaseConstraintException { if (null == descriptorKey || StringUtils.isBlank...
@Test public void getConfigurationByDescriptorNameAndContextNullTest() throws Exception { DefaultConfigurationAccessor configurationAccessor = new DefaultConfigurationAccessor(null, null, null, null, null, null, null, null); try { configurationAccessor.getConfigurationsByDescriptorNameAndContext(null, configContextEnum...
@Override public List<ConfigurationModel> getConfigurationsByDescriptorNameAndContext(String descriptorName, ConfigContextEnum context) throws AlertDatabaseConstraintException { if (StringUtils.isBlank(descriptorName)) { throw new AlertDatabaseConstraintException("Descriptor name cannot be null"); } if (null == context...
DefaultConfigurationAccessor implements ConfigurationAccessor { @Override public List<ConfigurationModel> getConfigurationsByDescriptorNameAndContext(String descriptorName, ConfigContextEnum context) throws AlertDatabaseConstraintException { if (StringUtils.isBlank(descriptorName)) { throw new AlertDatabaseConstraintEx...
DefaultConfigurationAccessor implements ConfigurationAccessor { @Override public List<ConfigurationModel> getConfigurationsByDescriptorNameAndContext(String descriptorName, ConfigContextEnum context) throws AlertDatabaseConstraintException { if (StringUtils.isBlank(descriptorName)) { throw new AlertDatabaseConstraintEx...
DefaultConfigurationAccessor implements ConfigurationAccessor { @Override public List<ConfigurationModel> getConfigurationsByDescriptorNameAndContext(String descriptorName, ConfigContextEnum context) throws AlertDatabaseConstraintException { if (StringUtils.isBlank(descriptorName)) { throw new AlertDatabaseConstraintEx...
DefaultConfigurationAccessor implements ConfigurationAccessor { @Override public List<ConfigurationModel> getConfigurationsByDescriptorNameAndContext(String descriptorName, ConfigContextEnum context) throws AlertDatabaseConstraintException { if (StringUtils.isBlank(descriptorName)) { throw new AlertDatabaseConstraintEx...
@Test public void updateConfigurationTest() throws Exception { Long configurationId = 2L; Long descriptorId = 3L; ConfigurationFieldModel configurationFieldModel = ConfigurationFieldModel.create("channel.common.name"); configurationFieldModel.setFieldValue(fieldValue); List<ConfigurationFieldModel> configuredFields = L...
@Override public ConfigurationModel updateConfiguration(Long descriptorConfigId, Collection<ConfigurationFieldModel> configuredFields) throws AlertDatabaseConstraintException { if (descriptorConfigId == null) { throw new AlertDatabaseConstraintException(NULL_CONFIG_ID); } DescriptorConfigEntity descriptorConfigEntity =...
DefaultConfigurationAccessor implements ConfigurationAccessor { @Override public ConfigurationModel updateConfiguration(Long descriptorConfigId, Collection<ConfigurationFieldModel> configuredFields) throws AlertDatabaseConstraintException { if (descriptorConfigId == null) { throw new AlertDatabaseConstraintException(NU...
DefaultConfigurationAccessor implements ConfigurationAccessor { @Override public ConfigurationModel updateConfiguration(Long descriptorConfigId, Collection<ConfigurationFieldModel> configuredFields) throws AlertDatabaseConstraintException { if (descriptorConfigId == null) { throw new AlertDatabaseConstraintException(NU...
DefaultConfigurationAccessor implements ConfigurationAccessor { @Override public ConfigurationModel updateConfiguration(Long descriptorConfigId, Collection<ConfigurationFieldModel> configuredFields) throws AlertDatabaseConstraintException { if (descriptorConfigId == null) { throw new AlertDatabaseConstraintException(NU...
DefaultConfigurationAccessor implements ConfigurationAccessor { @Override public ConfigurationModel updateConfiguration(Long descriptorConfigId, Collection<ConfigurationFieldModel> configuredFields) throws AlertDatabaseConstraintException { if (descriptorConfigId == null) { throw new AlertDatabaseConstraintException(NU...
@Test public void deleteProjectsTest() { ProviderProject providerProject = new ProviderProject(name, description, href, projectOwnerEmail); ProviderProjectRepository providerProjectRepository = Mockito.mock(ProviderProjectRepository.class); DefaultProviderDataAccessor providerDataAccessor = new DefaultProviderDataAcces...
@Override public void deleteProjects(Collection<ProviderProject> providerProjects) { providerProjects.forEach(project -> providerProjectRepository.deleteByHref(project.getHref())); }
DefaultProviderDataAccessor implements ProviderDataAccessor { @Override public void deleteProjects(Collection<ProviderProject> providerProjects) { providerProjects.forEach(project -> providerProjectRepository.deleteByHref(project.getHref())); } }
DefaultProviderDataAccessor implements ProviderDataAccessor { @Override public void deleteProjects(Collection<ProviderProject> providerProjects) { providerProjects.forEach(project -> providerProjectRepository.deleteByHref(project.getHref())); } @Autowired DefaultProviderDataAccessor(ProviderProjectRepository providerP...
DefaultProviderDataAccessor implements ProviderDataAccessor { @Override public void deleteProjects(Collection<ProviderProject> providerProjects) { providerProjects.forEach(project -> providerProjectRepository.deleteByHref(project.getHref())); } @Autowired DefaultProviderDataAccessor(ProviderProjectRepository providerP...
DefaultProviderDataAccessor implements ProviderDataAccessor { @Override public void deleteProjects(Collection<ProviderProject> providerProjects) { providerProjects.forEach(project -> providerProjectRepository.deleteByHref(project.getHref())); } @Autowired DefaultProviderDataAccessor(ProviderProjectRepository providerP...
@Test public void updateConfigurationNullTest() throws Exception { DefaultConfigurationAccessor configurationAccessor = new DefaultConfigurationAccessor(null, null, null, null, null, null, null, null); try { configurationAccessor.updateConfiguration(null, null); fail("Null descriptorConfigId and configuredFields did no...
@Override public ConfigurationModel updateConfiguration(Long descriptorConfigId, Collection<ConfigurationFieldModel> configuredFields) throws AlertDatabaseConstraintException { if (descriptorConfigId == null) { throw new AlertDatabaseConstraintException(NULL_CONFIG_ID); } DescriptorConfigEntity descriptorConfigEntity =...
DefaultConfigurationAccessor implements ConfigurationAccessor { @Override public ConfigurationModel updateConfiguration(Long descriptorConfigId, Collection<ConfigurationFieldModel> configuredFields) throws AlertDatabaseConstraintException { if (descriptorConfigId == null) { throw new AlertDatabaseConstraintException(NU...
DefaultConfigurationAccessor implements ConfigurationAccessor { @Override public ConfigurationModel updateConfiguration(Long descriptorConfigId, Collection<ConfigurationFieldModel> configuredFields) throws AlertDatabaseConstraintException { if (descriptorConfigId == null) { throw new AlertDatabaseConstraintException(NU...
DefaultConfigurationAccessor implements ConfigurationAccessor { @Override public ConfigurationModel updateConfiguration(Long descriptorConfigId, Collection<ConfigurationFieldModel> configuredFields) throws AlertDatabaseConstraintException { if (descriptorConfigId == null) { throw new AlertDatabaseConstraintException(NU...
DefaultConfigurationAccessor implements ConfigurationAccessor { @Override public ConfigurationModel updateConfiguration(Long descriptorConfigId, Collection<ConfigurationFieldModel> configuredFields) throws AlertDatabaseConstraintException { if (descriptorConfigId == null) { throw new AlertDatabaseConstraintException(NU...
@Test public void deleteConfigurationTest() throws Exception { ConfigurationModel configurationModel = new ConfigurationModel(1L, 2L, "dateCreated", "lastUpdated", configContextEnum); DefaultConfigurationAccessor configurationAccessor = new DefaultConfigurationAccessor(null, null, null, descriptorConfigRepository, null...
@Override public void deleteConfiguration(ConfigurationModel configModel) throws AlertDatabaseConstraintException { if (configModel == null) { throw new AlertDatabaseConstraintException("Cannot delete a null object from the database"); } deleteConfiguration(configModel.getConfigurationId()); }
DefaultConfigurationAccessor implements ConfigurationAccessor { @Override public void deleteConfiguration(ConfigurationModel configModel) throws AlertDatabaseConstraintException { if (configModel == null) { throw new AlertDatabaseConstraintException("Cannot delete a null object from the database"); } deleteConfiguratio...
DefaultConfigurationAccessor implements ConfigurationAccessor { @Override public void deleteConfiguration(ConfigurationModel configModel) throws AlertDatabaseConstraintException { if (configModel == null) { throw new AlertDatabaseConstraintException("Cannot delete a null object from the database"); } deleteConfiguratio...
DefaultConfigurationAccessor implements ConfigurationAccessor { @Override public void deleteConfiguration(ConfigurationModel configModel) throws AlertDatabaseConstraintException { if (configModel == null) { throw new AlertDatabaseConstraintException("Cannot delete a null object from the database"); } deleteConfiguratio...
DefaultConfigurationAccessor implements ConfigurationAccessor { @Override public void deleteConfiguration(ConfigurationModel configModel) throws AlertDatabaseConstraintException { if (configModel == null) { throw new AlertDatabaseConstraintException("Cannot delete a null object from the database"); } deleteConfiguratio...
@Test public void deleteConfigurationNullConfigModelTest() throws Exception { DefaultConfigurationAccessor configurationAccessor = new DefaultConfigurationAccessor(null, null, null, null, null, null, null, null); try { ConfigurationModel configurationModel = null; configurationAccessor.deleteConfiguration(configuration...
@Override public void deleteConfiguration(ConfigurationModel configModel) throws AlertDatabaseConstraintException { if (configModel == null) { throw new AlertDatabaseConstraintException("Cannot delete a null object from the database"); } deleteConfiguration(configModel.getConfigurationId()); }
DefaultConfigurationAccessor implements ConfigurationAccessor { @Override public void deleteConfiguration(ConfigurationModel configModel) throws AlertDatabaseConstraintException { if (configModel == null) { throw new AlertDatabaseConstraintException("Cannot delete a null object from the database"); } deleteConfiguratio...
DefaultConfigurationAccessor implements ConfigurationAccessor { @Override public void deleteConfiguration(ConfigurationModel configModel) throws AlertDatabaseConstraintException { if (configModel == null) { throw new AlertDatabaseConstraintException("Cannot delete a null object from the database"); } deleteConfiguratio...
DefaultConfigurationAccessor implements ConfigurationAccessor { @Override public void deleteConfiguration(ConfigurationModel configModel) throws AlertDatabaseConstraintException { if (configModel == null) { throw new AlertDatabaseConstraintException("Cannot delete a null object from the database"); } deleteConfiguratio...
DefaultConfigurationAccessor implements ConfigurationAccessor { @Override public void deleteConfiguration(ConfigurationModel configModel) throws AlertDatabaseConstraintException { if (configModel == null) { throw new AlertDatabaseConstraintException("Cannot delete a null object from the database"); } deleteConfiguratio...
@Test public void deleteConfigurationNullDescriptorConfigIdTest() throws Exception { DefaultConfigurationAccessor configurationAccessor = new DefaultConfigurationAccessor(null, null, null, null, null, null, null, null); try { Long descriptorConfigId = null; configurationAccessor.deleteConfiguration(descriptorConfigId);...
@Override public void deleteConfiguration(ConfigurationModel configModel) throws AlertDatabaseConstraintException { if (configModel == null) { throw new AlertDatabaseConstraintException("Cannot delete a null object from the database"); } deleteConfiguration(configModel.getConfigurationId()); }
DefaultConfigurationAccessor implements ConfigurationAccessor { @Override public void deleteConfiguration(ConfigurationModel configModel) throws AlertDatabaseConstraintException { if (configModel == null) { throw new AlertDatabaseConstraintException("Cannot delete a null object from the database"); } deleteConfiguratio...
DefaultConfigurationAccessor implements ConfigurationAccessor { @Override public void deleteConfiguration(ConfigurationModel configModel) throws AlertDatabaseConstraintException { if (configModel == null) { throw new AlertDatabaseConstraintException("Cannot delete a null object from the database"); } deleteConfiguratio...
DefaultConfigurationAccessor implements ConfigurationAccessor { @Override public void deleteConfiguration(ConfigurationModel configModel) throws AlertDatabaseConstraintException { if (configModel == null) { throw new AlertDatabaseConstraintException("Cannot delete a null object from the database"); } deleteConfiguratio...
DefaultConfigurationAccessor implements ConfigurationAccessor { @Override public void deleteConfiguration(ConfigurationModel configModel) throws AlertDatabaseConstraintException { if (configModel == null) { throw new AlertDatabaseConstraintException("Cannot delete a null object from the database"); } deleteConfiguratio...
@Test public void decryptTest() throws Exception { final String decryptedString = "decryptedString"; final String providerConfigName = "provider-config-name-test"; final String emptyProviderConfigName = "bad-config-name"; final Long fieldId = 1L; final Long descriptorId = 4L; final Long configurationId = 6L; DefinedFie...
private String decrypt(String value, boolean shouldDecrypt) { if (shouldDecrypt && value != null) { return encryptionUtility.decrypt(value); } return value; }
DefaultConfigurationAccessor implements ConfigurationAccessor { private String decrypt(String value, boolean shouldDecrypt) { if (shouldDecrypt && value != null) { return encryptionUtility.decrypt(value); } return value; } }
DefaultConfigurationAccessor implements ConfigurationAccessor { private String decrypt(String value, boolean shouldDecrypt) { if (shouldDecrypt && value != null) { return encryptionUtility.decrypt(value); } return value; } @Autowired DefaultConfigurationAccessor(RegisteredDescriptorRepository registeredDescriptorRepos...
DefaultConfigurationAccessor implements ConfigurationAccessor { private String decrypt(String value, boolean shouldDecrypt) { if (shouldDecrypt && value != null) { return encryptionUtility.decrypt(value); } return value; } @Autowired DefaultConfigurationAccessor(RegisteredDescriptorRepository registeredDescriptorRepos...
DefaultConfigurationAccessor implements ConfigurationAccessor { private String decrypt(String value, boolean shouldDecrypt) { if (shouldDecrypt && value != null) { return encryptionUtility.decrypt(value); } return value; } @Autowired DefaultConfigurationAccessor(RegisteredDescriptorRepository registeredDescriptorRepos...
@Test public void findMatchingAuditIdTest() { AuditEntryRepository auditEntryRepository = Mockito.mock(AuditEntryRepository.class); Mockito.when(auditEntryRepository.findMatchingAudit(Mockito.anyLong(), Mockito.any(UUID.class))).thenReturn(Optional.empty()); DefaultAuditAccessor auditUtility = new DefaultAuditAccessor(...
@Override public Optional<Long> findMatchingAuditId(Long notificationId, UUID commonDistributionId) { return auditEntryRepository.findMatchingAudit(notificationId, commonDistributionId).map(AuditEntryEntity::getId); }
DefaultAuditAccessor implements AuditAccessor { @Override public Optional<Long> findMatchingAuditId(Long notificationId, UUID commonDistributionId) { return auditEntryRepository.findMatchingAudit(notificationId, commonDistributionId).map(AuditEntryEntity::getId); } }
DefaultAuditAccessor implements AuditAccessor { @Override public Optional<Long> findMatchingAuditId(Long notificationId, UUID commonDistributionId) { return auditEntryRepository.findMatchingAudit(notificationId, commonDistributionId).map(AuditEntryEntity::getId); } @Autowired DefaultAuditAccessor(AuditEntryRepository ...
DefaultAuditAccessor implements AuditAccessor { @Override public Optional<Long> findMatchingAuditId(Long notificationId, UUID commonDistributionId) { return auditEntryRepository.findMatchingAudit(notificationId, commonDistributionId).map(AuditEntryEntity::getId); } @Autowired DefaultAuditAccessor(AuditEntryRepository ...
DefaultAuditAccessor implements AuditAccessor { @Override public Optional<Long> findMatchingAuditId(Long notificationId, UUID commonDistributionId) { return auditEntryRepository.findMatchingAudit(notificationId, commonDistributionId).map(AuditEntryEntity::getId); } @Autowired DefaultAuditAccessor(AuditEntryRepository ...
@Test public void findFirstByJobIdEmptyTest() { AuditEntryRepository auditEntryRepository = Mockito.mock(AuditEntryRepository.class); ContentConverter contentConverter = Mockito.mock(ContentConverter.class); Mockito.when(auditEntryRepository.findFirstByCommonConfigIdOrderByTimeLastSentDesc(Mockito.any(UUID.class))).the...
@Override @Transactional public Optional<AuditJobStatusModel> findFirstByJobId(UUID jobId) { Optional<AuditEntryEntity> auditEntryEntity = auditEntryRepository.findFirstByCommonConfigIdOrderByTimeLastSentDesc(jobId); return auditEntryEntity.map(this::convertToJobStatusModel); }
DefaultAuditAccessor implements AuditAccessor { @Override @Transactional public Optional<AuditJobStatusModel> findFirstByJobId(UUID jobId) { Optional<AuditEntryEntity> auditEntryEntity = auditEntryRepository.findFirstByCommonConfigIdOrderByTimeLastSentDesc(jobId); return auditEntryEntity.map(this::convertToJobStatusMod...
DefaultAuditAccessor implements AuditAccessor { @Override @Transactional public Optional<AuditJobStatusModel> findFirstByJobId(UUID jobId) { Optional<AuditEntryEntity> auditEntryEntity = auditEntryRepository.findFirstByCommonConfigIdOrderByTimeLastSentDesc(jobId); return auditEntryEntity.map(this::convertToJobStatusMod...
DefaultAuditAccessor implements AuditAccessor { @Override @Transactional public Optional<AuditJobStatusModel> findFirstByJobId(UUID jobId) { Optional<AuditEntryEntity> auditEntryEntity = auditEntryRepository.findFirstByCommonConfigIdOrderByTimeLastSentDesc(jobId); return auditEntryEntity.map(this::convertToJobStatusMod...
DefaultAuditAccessor implements AuditAccessor { @Override @Transactional public Optional<AuditJobStatusModel> findFirstByJobId(UUID jobId) { Optional<AuditEntryEntity> auditEntryEntity = auditEntryRepository.findFirstByCommonConfigIdOrderByTimeLastSentDesc(jobId); return auditEntryEntity.map(this::convertToJobStatusMod...
@Test public void findFirstByJobIdNullTest() { AuditEntryRepository auditEntryRepository = Mockito.mock(AuditEntryRepository.class); ContentConverter contentConverter = Mockito.mock(ContentConverter.class); AuditEntryEntity auditEntryEntity = new AuditEntryEntity(null, null, null, null, null, null); Mockito.when(auditE...
@Override @Transactional public Optional<AuditJobStatusModel> findFirstByJobId(UUID jobId) { Optional<AuditEntryEntity> auditEntryEntity = auditEntryRepository.findFirstByCommonConfigIdOrderByTimeLastSentDesc(jobId); return auditEntryEntity.map(this::convertToJobStatusModel); }
DefaultAuditAccessor implements AuditAccessor { @Override @Transactional public Optional<AuditJobStatusModel> findFirstByJobId(UUID jobId) { Optional<AuditEntryEntity> auditEntryEntity = auditEntryRepository.findFirstByCommonConfigIdOrderByTimeLastSentDesc(jobId); return auditEntryEntity.map(this::convertToJobStatusMod...
DefaultAuditAccessor implements AuditAccessor { @Override @Transactional public Optional<AuditJobStatusModel> findFirstByJobId(UUID jobId) { Optional<AuditEntryEntity> auditEntryEntity = auditEntryRepository.findFirstByCommonConfigIdOrderByTimeLastSentDesc(jobId); return auditEntryEntity.map(this::convertToJobStatusMod...
DefaultAuditAccessor implements AuditAccessor { @Override @Transactional public Optional<AuditJobStatusModel> findFirstByJobId(UUID jobId) { Optional<AuditEntryEntity> auditEntryEntity = auditEntryRepository.findFirstByCommonConfigIdOrderByTimeLastSentDesc(jobId); return auditEntryEntity.map(this::convertToJobStatusMod...
DefaultAuditAccessor implements AuditAccessor { @Override @Transactional public Optional<AuditJobStatusModel> findFirstByJobId(UUID jobId) { Optional<AuditEntryEntity> auditEntryEntity = auditEntryRepository.findFirstByCommonConfigIdOrderByTimeLastSentDesc(jobId); return auditEntryEntity.map(this::convertToJobStatusMod...
@Test public void findFirstByJobIdNotNullTest() { OffsetDateTime timeLastSent = DateUtils.createCurrentDateTimestamp(); OffsetDateTime timeCreated = timeLastSent.minusMinutes(10L); AuditEntryStatus status = AuditEntryStatus.PENDING; UUID testUUID = UUID.randomUUID(); AuditEntryRepository auditEntryRepository = Mockito....
@Override @Transactional public Optional<AuditJobStatusModel> findFirstByJobId(UUID jobId) { Optional<AuditEntryEntity> auditEntryEntity = auditEntryRepository.findFirstByCommonConfigIdOrderByTimeLastSentDesc(jobId); return auditEntryEntity.map(this::convertToJobStatusModel); }
DefaultAuditAccessor implements AuditAccessor { @Override @Transactional public Optional<AuditJobStatusModel> findFirstByJobId(UUID jobId) { Optional<AuditEntryEntity> auditEntryEntity = auditEntryRepository.findFirstByCommonConfigIdOrderByTimeLastSentDesc(jobId); return auditEntryEntity.map(this::convertToJobStatusMod...
DefaultAuditAccessor implements AuditAccessor { @Override @Transactional public Optional<AuditJobStatusModel> findFirstByJobId(UUID jobId) { Optional<AuditEntryEntity> auditEntryEntity = auditEntryRepository.findFirstByCommonConfigIdOrderByTimeLastSentDesc(jobId); return auditEntryEntity.map(this::convertToJobStatusMod...
DefaultAuditAccessor implements AuditAccessor { @Override @Transactional public Optional<AuditJobStatusModel> findFirstByJobId(UUID jobId) { Optional<AuditEntryEntity> auditEntryEntity = auditEntryRepository.findFirstByCommonConfigIdOrderByTimeLastSentDesc(jobId); return auditEntryEntity.map(this::convertToJobStatusMod...
DefaultAuditAccessor implements AuditAccessor { @Override @Transactional public Optional<AuditJobStatusModel> findFirstByJobId(UUID jobId) { Optional<AuditEntryEntity> auditEntryEntity = auditEntryRepository.findFirstByCommonConfigIdOrderByTimeLastSentDesc(jobId); return auditEntryEntity.map(this::convertToJobStatusMod...
@Test public void getPageOfAuditEntriesTest() { Integer pageNumber = 0; int pageSize = 2; String searchTerm = null; String sortField = "lastSent"; String sortOrder = "ASC"; Boolean onlyShowSentNotifications = Boolean.TRUE; String overallStatus = "overallStatusString"; String lastSent = DateUtils.createCurrentDateString...
@Override @Transactional public AuditEntryPageModel getPageOfAuditEntries(Integer pageNumber, Integer pageSize, String searchTerm, String sortField, String sortOrder, boolean onlyShowSentNotifications, Function<AlertNotificationModel, AuditEntryModel> notificationToAuditEntryConverter) { Page<AlertNotificationModel> au...
DefaultAuditAccessor implements AuditAccessor { @Override @Transactional public AuditEntryPageModel getPageOfAuditEntries(Integer pageNumber, Integer pageSize, String searchTerm, String sortField, String sortOrder, boolean onlyShowSentNotifications, Function<AlertNotificationModel, AuditEntryModel> notificationToAuditE...
DefaultAuditAccessor implements AuditAccessor { @Override @Transactional public AuditEntryPageModel getPageOfAuditEntries(Integer pageNumber, Integer pageSize, String searchTerm, String sortField, String sortOrder, boolean onlyShowSentNotifications, Function<AlertNotificationModel, AuditEntryModel> notificationToAuditE...
DefaultAuditAccessor implements AuditAccessor { @Override @Transactional public AuditEntryPageModel getPageOfAuditEntries(Integer pageNumber, Integer pageSize, String searchTerm, String sortField, String sortOrder, boolean onlyShowSentNotifications, Function<AlertNotificationModel, AuditEntryModel> notificationToAuditE...
DefaultAuditAccessor implements AuditAccessor { @Override @Transactional public AuditEntryPageModel getPageOfAuditEntries(Integer pageNumber, Integer pageSize, String searchTerm, String sortField, String sortOrder, boolean onlyShowSentNotifications, Function<AlertNotificationModel, AuditEntryModel> notificationToAuditE...
@Test public void getEmailAddressesForProjectHrefTest() throws Exception { ProviderProjectEntity providerProjectEntity = new ProviderProjectEntity(name, description, href, projectOwnerEmail, 1L); providerProjectEntity.setId(1L); ProviderUserProjectRelation providerUserProjectRelation = new ProviderUserProjectRelation(2...
@Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public Set<String> getEmailAddressesForProjectHref(String projectHref) { Optional<Long> projectId = providerProjectRepository.findFirstByHref(projectHref).map(ProviderProjectEntity::getId); if (projectId.isPresent()) { Set<Long> userIds = p...
DefaultProviderDataAccessor implements ProviderDataAccessor { @Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public Set<String> getEmailAddressesForProjectHref(String projectHref) { Optional<Long> projectId = providerProjectRepository.findFirstByHref(projectHref).map(ProviderProjectEnti...
DefaultProviderDataAccessor implements ProviderDataAccessor { @Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public Set<String> getEmailAddressesForProjectHref(String projectHref) { Optional<Long> projectId = providerProjectRepository.findFirstByHref(projectHref).map(ProviderProjectEnti...
DefaultProviderDataAccessor implements ProviderDataAccessor { @Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public Set<String> getEmailAddressesForProjectHref(String projectHref) { Optional<Long> projectId = providerProjectRepository.findFirstByHref(projectHref).map(ProviderProjectEnti...
DefaultProviderDataAccessor implements ProviderDataAccessor { @Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public Set<String> getEmailAddressesForProjectHref(String projectHref) { Optional<Long> projectId = providerProjectRepository.findFirstByHref(projectHref).map(ProviderProjectEnti...
@Test public void convertToAuditEntryModelFromNotificationTest() throws Exception { Long id = 1L; Long providerConfigId = 2L; String provider = "provider-test"; String providerConfigName = "providerConfigName-test"; String notificationType = "notificationType-test"; String content = "content-test"; OffsetDateTime timeL...
@Override @Transactional public AuditEntryModel convertToAuditEntryModelFromNotification(AlertNotificationModel notificationContentEntry) { List<AuditNotificationRelation> relations = auditNotificationRepository.findByNotificationId(notificationContentEntry.getId()); List<Long> auditEntryIds = relations.stream().map(Au...
DefaultAuditAccessor implements AuditAccessor { @Override @Transactional public AuditEntryModel convertToAuditEntryModelFromNotification(AlertNotificationModel notificationContentEntry) { List<AuditNotificationRelation> relations = auditNotificationRepository.findByNotificationId(notificationContentEntry.getId()); List...
DefaultAuditAccessor implements AuditAccessor { @Override @Transactional public AuditEntryModel convertToAuditEntryModelFromNotification(AlertNotificationModel notificationContentEntry) { List<AuditNotificationRelation> relations = auditNotificationRepository.findByNotificationId(notificationContentEntry.getId()); List...
DefaultAuditAccessor implements AuditAccessor { @Override @Transactional public AuditEntryModel convertToAuditEntryModelFromNotification(AlertNotificationModel notificationContentEntry) { List<AuditNotificationRelation> relations = auditNotificationRepository.findByNotificationId(notificationContentEntry.getId()); List...
DefaultAuditAccessor implements AuditAccessor { @Override @Transactional public AuditEntryModel convertToAuditEntryModelFromNotification(AlertNotificationModel notificationContentEntry) { List<AuditNotificationRelation> relations = auditNotificationRepository.findByNotificationId(notificationContentEntry.getId()); List...
@Test public void createAuditEntryTest() throws Exception { AuditEntryRepository auditEntryRepository = Mockito.mock(AuditEntryRepository.class); AuditNotificationRepository auditNotificationRepository = Mockito.mock(AuditNotificationRepository.class); DefaultAuditAccessor auditUtility = new DefaultAuditAccessor(auditE...
@Override @Transactional public Map<Long, Long> createAuditEntry(Map<Long, Long> existingNotificationIdToAuditId, UUID jobId, MessageContentGroup contentGroup) { Map<Long, Long> notificationIdToAuditId = new HashMap<>(); List<ProviderMessageContent> subContent = contentGroup.getSubContent(); Set<Long> componentNotifica...
DefaultAuditAccessor implements AuditAccessor { @Override @Transactional public Map<Long, Long> createAuditEntry(Map<Long, Long> existingNotificationIdToAuditId, UUID jobId, MessageContentGroup contentGroup) { Map<Long, Long> notificationIdToAuditId = new HashMap<>(); List<ProviderMessageContent> subContent = contentGr...
DefaultAuditAccessor implements AuditAccessor { @Override @Transactional public Map<Long, Long> createAuditEntry(Map<Long, Long> existingNotificationIdToAuditId, UUID jobId, MessageContentGroup contentGroup) { Map<Long, Long> notificationIdToAuditId = new HashMap<>(); List<ProviderMessageContent> subContent = contentGr...
DefaultAuditAccessor implements AuditAccessor { @Override @Transactional public Map<Long, Long> createAuditEntry(Map<Long, Long> existingNotificationIdToAuditId, UUID jobId, MessageContentGroup contentGroup) { Map<Long, Long> notificationIdToAuditId = new HashMap<>(); List<ProviderMessageContent> subContent = contentGr...
DefaultAuditAccessor implements AuditAccessor { @Override @Transactional public Map<Long, Long> createAuditEntry(Map<Long, Long> existingNotificationIdToAuditId, UUID jobId, MessageContentGroup contentGroup) { Map<Long, Long> notificationIdToAuditId = new HashMap<>(); List<ProviderMessageContent> subContent = contentGr...
@Test public void createAuditEntryNullEntryIdTest() throws Exception { AuditEntryRepository auditEntryRepository = Mockito.mock(AuditEntryRepository.class); AuditNotificationRepository auditNotificationRepository = Mockito.mock(AuditNotificationRepository.class); DefaultAuditAccessor auditUtility = new DefaultAuditAcce...
@Override @Transactional public Map<Long, Long> createAuditEntry(Map<Long, Long> existingNotificationIdToAuditId, UUID jobId, MessageContentGroup contentGroup) { Map<Long, Long> notificationIdToAuditId = new HashMap<>(); List<ProviderMessageContent> subContent = contentGroup.getSubContent(); Set<Long> componentNotifica...
DefaultAuditAccessor implements AuditAccessor { @Override @Transactional public Map<Long, Long> createAuditEntry(Map<Long, Long> existingNotificationIdToAuditId, UUID jobId, MessageContentGroup contentGroup) { Map<Long, Long> notificationIdToAuditId = new HashMap<>(); List<ProviderMessageContent> subContent = contentGr...
DefaultAuditAccessor implements AuditAccessor { @Override @Transactional public Map<Long, Long> createAuditEntry(Map<Long, Long> existingNotificationIdToAuditId, UUID jobId, MessageContentGroup contentGroup) { Map<Long, Long> notificationIdToAuditId = new HashMap<>(); List<ProviderMessageContent> subContent = contentGr...
DefaultAuditAccessor implements AuditAccessor { @Override @Transactional public Map<Long, Long> createAuditEntry(Map<Long, Long> existingNotificationIdToAuditId, UUID jobId, MessageContentGroup contentGroup) { Map<Long, Long> notificationIdToAuditId = new HashMap<>(); List<ProviderMessageContent> subContent = contentGr...
DefaultAuditAccessor implements AuditAccessor { @Override @Transactional public Map<Long, Long> createAuditEntry(Map<Long, Long> existingNotificationIdToAuditId, UUID jobId, MessageContentGroup contentGroup) { Map<Long, Long> notificationIdToAuditId = new HashMap<>(); List<ProviderMessageContent> subContent = contentGr...
@Test public void setAuditEntrySuccessCatchExceptionTest() { DefaultAuditAccessor auditUtility = new DefaultAuditAccessor(null, null, null, null, null); auditUtility.setAuditEntrySuccess(Collections.singletonList(1L)); }
@Override @Transactional public void setAuditEntrySuccess(Collection<Long> auditEntryIds) { for (Long auditEntryId : auditEntryIds) { try { Optional<AuditEntryEntity> auditEntryEntityOptional = auditEntryRepository.findById(auditEntryId); if (auditEntryEntityOptional.isEmpty()) { logger.error("Could not find the audit ...
DefaultAuditAccessor implements AuditAccessor { @Override @Transactional public void setAuditEntrySuccess(Collection<Long> auditEntryIds) { for (Long auditEntryId : auditEntryIds) { try { Optional<AuditEntryEntity> auditEntryEntityOptional = auditEntryRepository.findById(auditEntryId); if (auditEntryEntityOptional.isEm...
DefaultAuditAccessor implements AuditAccessor { @Override @Transactional public void setAuditEntrySuccess(Collection<Long> auditEntryIds) { for (Long auditEntryId : auditEntryIds) { try { Optional<AuditEntryEntity> auditEntryEntityOptional = auditEntryRepository.findById(auditEntryId); if (auditEntryEntityOptional.isEm...
DefaultAuditAccessor implements AuditAccessor { @Override @Transactional public void setAuditEntrySuccess(Collection<Long> auditEntryIds) { for (Long auditEntryId : auditEntryIds) { try { Optional<AuditEntryEntity> auditEntryEntityOptional = auditEntryRepository.findById(auditEntryId); if (auditEntryEntityOptional.isEm...
DefaultAuditAccessor implements AuditAccessor { @Override @Transactional public void setAuditEntrySuccess(Collection<Long> auditEntryIds) { for (Long auditEntryId : auditEntryIds) { try { Optional<AuditEntryEntity> auditEntryEntityOptional = auditEntryRepository.findById(auditEntryId); if (auditEntryEntityOptional.isEm...
@Test public void setAuditEntrySuccessTest() { AuditEntryRepository auditEntryRepository = Mockito.mock(AuditEntryRepository.class); DefaultAuditAccessor auditUtility = new DefaultAuditAccessor(auditEntryRepository, null, null, null, null); AuditEntryEntity entity = new AuditEntryEntity(UUID.randomUUID(), DateUtils.cre...
@Override @Transactional public void setAuditEntrySuccess(Collection<Long> auditEntryIds) { for (Long auditEntryId : auditEntryIds) { try { Optional<AuditEntryEntity> auditEntryEntityOptional = auditEntryRepository.findById(auditEntryId); if (auditEntryEntityOptional.isEmpty()) { logger.error("Could not find the audit ...
DefaultAuditAccessor implements AuditAccessor { @Override @Transactional public void setAuditEntrySuccess(Collection<Long> auditEntryIds) { for (Long auditEntryId : auditEntryIds) { try { Optional<AuditEntryEntity> auditEntryEntityOptional = auditEntryRepository.findById(auditEntryId); if (auditEntryEntityOptional.isEm...
DefaultAuditAccessor implements AuditAccessor { @Override @Transactional public void setAuditEntrySuccess(Collection<Long> auditEntryIds) { for (Long auditEntryId : auditEntryIds) { try { Optional<AuditEntryEntity> auditEntryEntityOptional = auditEntryRepository.findById(auditEntryId); if (auditEntryEntityOptional.isEm...
DefaultAuditAccessor implements AuditAccessor { @Override @Transactional public void setAuditEntrySuccess(Collection<Long> auditEntryIds) { for (Long auditEntryId : auditEntryIds) { try { Optional<AuditEntryEntity> auditEntryEntityOptional = auditEntryRepository.findById(auditEntryId); if (auditEntryEntityOptional.isEm...
DefaultAuditAccessor implements AuditAccessor { @Override @Transactional public void setAuditEntrySuccess(Collection<Long> auditEntryIds) { for (Long auditEntryId : auditEntryIds) { try { Optional<AuditEntryEntity> auditEntryEntityOptional = auditEntryRepository.findById(auditEntryId); if (auditEntryEntityOptional.isEm...
@Test public void setAuditEntryFailureCatchExceptionTest() { DefaultAuditAccessor auditUtility = new DefaultAuditAccessor(null, null, null, null, null); auditUtility.setAuditEntryFailure(Collections.singletonList(1L), null, null); }
@Override @Transactional public void setAuditEntryFailure(Collection<Long> auditEntryIds, String errorMessage, Throwable t) { for (Long auditEntryId : auditEntryIds) { try { Optional<AuditEntryEntity> auditEntryEntityOptional = auditEntryRepository.findById(auditEntryId); if (auditEntryEntityOptional.isEmpty()) { logge...
DefaultAuditAccessor implements AuditAccessor { @Override @Transactional public void setAuditEntryFailure(Collection<Long> auditEntryIds, String errorMessage, Throwable t) { for (Long auditEntryId : auditEntryIds) { try { Optional<AuditEntryEntity> auditEntryEntityOptional = auditEntryRepository.findById(auditEntryId);...
DefaultAuditAccessor implements AuditAccessor { @Override @Transactional public void setAuditEntryFailure(Collection<Long> auditEntryIds, String errorMessage, Throwable t) { for (Long auditEntryId : auditEntryIds) { try { Optional<AuditEntryEntity> auditEntryEntityOptional = auditEntryRepository.findById(auditEntryId);...
DefaultAuditAccessor implements AuditAccessor { @Override @Transactional public void setAuditEntryFailure(Collection<Long> auditEntryIds, String errorMessage, Throwable t) { for (Long auditEntryId : auditEntryIds) { try { Optional<AuditEntryEntity> auditEntryEntityOptional = auditEntryRepository.findById(auditEntryId);...
DefaultAuditAccessor implements AuditAccessor { @Override @Transactional public void setAuditEntryFailure(Collection<Long> auditEntryIds, String errorMessage, Throwable t) { for (Long auditEntryId : auditEntryIds) { try { Optional<AuditEntryEntity> auditEntryEntityOptional = auditEntryRepository.findById(auditEntryId);...
@Test public void setAuditEntryFailureTest() { AuditEntryRepository auditEntryRepository = Mockito.mock(AuditEntryRepository.class); DefaultAuditAccessor auditUtility = new DefaultAuditAccessor(auditEntryRepository, null, null, null, null); AuditEntryEntity entity = new AuditEntryEntity(UUID.randomUUID(), DateUtils.cre...
@Override @Transactional public void setAuditEntryFailure(Collection<Long> auditEntryIds, String errorMessage, Throwable t) { for (Long auditEntryId : auditEntryIds) { try { Optional<AuditEntryEntity> auditEntryEntityOptional = auditEntryRepository.findById(auditEntryId); if (auditEntryEntityOptional.isEmpty()) { logge...
DefaultAuditAccessor implements AuditAccessor { @Override @Transactional public void setAuditEntryFailure(Collection<Long> auditEntryIds, String errorMessage, Throwable t) { for (Long auditEntryId : auditEntryIds) { try { Optional<AuditEntryEntity> auditEntryEntityOptional = auditEntryRepository.findById(auditEntryId);...
DefaultAuditAccessor implements AuditAccessor { @Override @Transactional public void setAuditEntryFailure(Collection<Long> auditEntryIds, String errorMessage, Throwable t) { for (Long auditEntryId : auditEntryIds) { try { Optional<AuditEntryEntity> auditEntryEntityOptional = auditEntryRepository.findById(auditEntryId);...
DefaultAuditAccessor implements AuditAccessor { @Override @Transactional public void setAuditEntryFailure(Collection<Long> auditEntryIds, String errorMessage, Throwable t) { for (Long auditEntryId : auditEntryIds) { try { Optional<AuditEntryEntity> auditEntryEntityOptional = auditEntryRepository.findById(auditEntryId);...
DefaultAuditAccessor implements AuditAccessor { @Override @Transactional public void setAuditEntryFailure(Collection<Long> auditEntryIds, String errorMessage, Throwable t) { for (Long auditEntryId : auditEntryIds) { try { Optional<AuditEntryEntity> auditEntryEntityOptional = auditEntryRepository.findById(auditEntryId);...
@Test public void saveAllNotificationsTest() throws Exception { OffsetDateTime createdAt = DateUtils.createCurrentDateTimestamp(); OffsetDateTime providerCreationTime = createdAt.minusSeconds(10); AlertNotificationModel alertNotificationModel = new AlertNotificationModel(null, providerConfigId, provider, providerConfig...
@Override public List<AlertNotificationModel> saveAllNotifications(Collection<AlertNotificationModel> notifications) { List<NotificationEntity> entitiesToSave = notifications .stream() .map(this::fromModel) .collect(Collectors.toList()); List<AlertNotificationModel> savedModels = notificationContentRepository.saveAll(e...
DefaultNotificationAccessor implements NotificationAccessor { @Override public List<AlertNotificationModel> saveAllNotifications(Collection<AlertNotificationModel> notifications) { List<NotificationEntity> entitiesToSave = notifications .stream() .map(this::fromModel) .collect(Collectors.toList()); List<AlertNotificati...
DefaultNotificationAccessor implements NotificationAccessor { @Override public List<AlertNotificationModel> saveAllNotifications(Collection<AlertNotificationModel> notifications) { List<NotificationEntity> entitiesToSave = notifications .stream() .map(this::fromModel) .collect(Collectors.toList()); List<AlertNotificati...
DefaultNotificationAccessor implements NotificationAccessor { @Override public List<AlertNotificationModel> saveAllNotifications(Collection<AlertNotificationModel> notifications) { List<NotificationEntity> entitiesToSave = notifications .stream() .map(this::fromModel) .collect(Collectors.toList()); List<AlertNotificati...
DefaultNotificationAccessor implements NotificationAccessor { @Override public List<AlertNotificationModel> saveAllNotifications(Collection<AlertNotificationModel> notifications) { List<NotificationEntity> entitiesToSave = notifications .stream() .map(this::fromModel) .collect(Collectors.toList()); List<AlertNotificati...
@Test public void saveAllNotificationsEmptyModelListTest() { NotificationContentRepository notificationContentRepository = Mockito.mock(NotificationContentRepository.class); Mockito.when(notificationContentRepository.saveAll(Mockito.any())).thenReturn(new ArrayList<>()); DefaultNotificationAccessor notificationManager ...
@Override public List<AlertNotificationModel> saveAllNotifications(Collection<AlertNotificationModel> notifications) { List<NotificationEntity> entitiesToSave = notifications .stream() .map(this::fromModel) .collect(Collectors.toList()); List<AlertNotificationModel> savedModels = notificationContentRepository.saveAll(e...
DefaultNotificationAccessor implements NotificationAccessor { @Override public List<AlertNotificationModel> saveAllNotifications(Collection<AlertNotificationModel> notifications) { List<NotificationEntity> entitiesToSave = notifications .stream() .map(this::fromModel) .collect(Collectors.toList()); List<AlertNotificati...
DefaultNotificationAccessor implements NotificationAccessor { @Override public List<AlertNotificationModel> saveAllNotifications(Collection<AlertNotificationModel> notifications) { List<NotificationEntity> entitiesToSave = notifications .stream() .map(this::fromModel) .collect(Collectors.toList()); List<AlertNotificati...
DefaultNotificationAccessor implements NotificationAccessor { @Override public List<AlertNotificationModel> saveAllNotifications(Collection<AlertNotificationModel> notifications) { List<NotificationEntity> entitiesToSave = notifications .stream() .map(this::fromModel) .collect(Collectors.toList()); List<AlertNotificati...
DefaultNotificationAccessor implements NotificationAccessor { @Override public List<AlertNotificationModel> saveAllNotifications(Collection<AlertNotificationModel> notifications) { List<NotificationEntity> entitiesToSave = notifications .stream() .map(this::fromModel) .collect(Collectors.toList()); List<AlertNotificati...
@Test public void finalAllTest() throws Exception { PageRequest pageRequest = PageRequest.of(0, 10); NotificationEntity notificationEntity = new NotificationEntity(id, DateUtils.createCurrentDateTimestamp(), provider, providerConfigId, DateUtils.createCurrentDateTimestamp(), notificationType, content); Page<Notificatio...
@Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public Page<AlertNotificationModel> findAll(PageRequest pageRequest, boolean onlyShowSentNotifications) { if (onlyShowSentNotifications) { Page<NotificationEntity> allSentNotifications = notificationContentRepository.findAllSentNotifications(pageRequ...
DefaultNotificationAccessor implements NotificationAccessor { @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public Page<AlertNotificationModel> findAll(PageRequest pageRequest, boolean onlyShowSentNotifications) { if (onlyShowSentNotifications) { Page<NotificationEntity> allSentNotifications = n...
DefaultNotificationAccessor implements NotificationAccessor { @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public Page<AlertNotificationModel> findAll(PageRequest pageRequest, boolean onlyShowSentNotifications) { if (onlyShowSentNotifications) { Page<NotificationEntity> allSentNotifications = n...
DefaultNotificationAccessor implements NotificationAccessor { @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public Page<AlertNotificationModel> findAll(PageRequest pageRequest, boolean onlyShowSentNotifications) { if (onlyShowSentNotifications) { Page<NotificationEntity> allSentNotifications = n...
DefaultNotificationAccessor implements NotificationAccessor { @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public Page<AlertNotificationModel> findAll(PageRequest pageRequest, boolean onlyShowSentNotifications) { if (onlyShowSentNotifications) { Page<NotificationEntity> allSentNotifications = n...
@Test public void getEmailAddressesForProjectHrefEmptyTest() { ProviderProjectRepository providerProjectRepository = Mockito.mock(ProviderProjectRepository.class); Mockito.when(providerProjectRepository.findFirstByHref(Mockito.any())).thenReturn(Optional.empty()); DefaultProviderDataAccessor providerDataAccessor = new ...
@Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public Set<String> getEmailAddressesForProjectHref(String projectHref) { Optional<Long> projectId = providerProjectRepository.findFirstByHref(projectHref).map(ProviderProjectEntity::getId); if (projectId.isPresent()) { Set<Long> userIds = p...
DefaultProviderDataAccessor implements ProviderDataAccessor { @Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public Set<String> getEmailAddressesForProjectHref(String projectHref) { Optional<Long> projectId = providerProjectRepository.findFirstByHref(projectHref).map(ProviderProjectEnti...
DefaultProviderDataAccessor implements ProviderDataAccessor { @Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public Set<String> getEmailAddressesForProjectHref(String projectHref) { Optional<Long> projectId = providerProjectRepository.findFirstByHref(projectHref).map(ProviderProjectEnti...
DefaultProviderDataAccessor implements ProviderDataAccessor { @Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public Set<String> getEmailAddressesForProjectHref(String projectHref) { Optional<Long> projectId = providerProjectRepository.findFirstByHref(projectHref).map(ProviderProjectEnti...
DefaultProviderDataAccessor implements ProviderDataAccessor { @Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public Set<String> getEmailAddressesForProjectHref(String projectHref) { Optional<Long> projectId = providerProjectRepository.findFirstByHref(projectHref).map(ProviderProjectEnti...
@Test public void finalAllShowNotificationsFalseTest() throws Exception { PageRequest pageRequest = PageRequest.of(0, 10); NotificationEntity notificationEntity = new NotificationEntity(id, DateUtils.createCurrentDateTimestamp(), provider, providerConfigId, DateUtils.createCurrentDateTimestamp(), notificationType, cont...
@Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public Page<AlertNotificationModel> findAll(PageRequest pageRequest, boolean onlyShowSentNotifications) { if (onlyShowSentNotifications) { Page<NotificationEntity> allSentNotifications = notificationContentRepository.findAllSentNotifications(pageRequ...
DefaultNotificationAccessor implements NotificationAccessor { @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public Page<AlertNotificationModel> findAll(PageRequest pageRequest, boolean onlyShowSentNotifications) { if (onlyShowSentNotifications) { Page<NotificationEntity> allSentNotifications = n...
DefaultNotificationAccessor implements NotificationAccessor { @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public Page<AlertNotificationModel> findAll(PageRequest pageRequest, boolean onlyShowSentNotifications) { if (onlyShowSentNotifications) { Page<NotificationEntity> allSentNotifications = n...
DefaultNotificationAccessor implements NotificationAccessor { @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public Page<AlertNotificationModel> findAll(PageRequest pageRequest, boolean onlyShowSentNotifications) { if (onlyShowSentNotifications) { Page<NotificationEntity> allSentNotifications = n...
DefaultNotificationAccessor implements NotificationAccessor { @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public Page<AlertNotificationModel> findAll(PageRequest pageRequest, boolean onlyShowSentNotifications) { if (onlyShowSentNotifications) { Page<NotificationEntity> allSentNotifications = n...
@Test public void findAllWithSearchTest() throws Exception { final String searchTerm = "searchTerm-test"; PageRequest pageRequest = PageRequest.of(0, 10); NotificationEntity notificationEntity = new NotificationEntity(id, DateUtils.createCurrentDateTimestamp(), provider, providerConfigId, DateUtils.createCurrentDateTim...
@Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public Page<AlertNotificationModel> findAllWithSearch(String searchTerm, PageRequest pageRequest, boolean onlyShowSentNotifications) { String lcSearchTerm = searchTerm.toLowerCase(Locale.ENGLISH); Page<NotificationEntity> matchingNotifications; if (o...
DefaultNotificationAccessor implements NotificationAccessor { @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public Page<AlertNotificationModel> findAllWithSearch(String searchTerm, PageRequest pageRequest, boolean onlyShowSentNotifications) { String lcSearchTerm = searchTerm.toLowerCase(Locale.E...
DefaultNotificationAccessor implements NotificationAccessor { @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public Page<AlertNotificationModel> findAllWithSearch(String searchTerm, PageRequest pageRequest, boolean onlyShowSentNotifications) { String lcSearchTerm = searchTerm.toLowerCase(Locale.E...
DefaultNotificationAccessor implements NotificationAccessor { @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public Page<AlertNotificationModel> findAllWithSearch(String searchTerm, PageRequest pageRequest, boolean onlyShowSentNotifications) { String lcSearchTerm = searchTerm.toLowerCase(Locale.E...
DefaultNotificationAccessor implements NotificationAccessor { @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public Page<AlertNotificationModel> findAllWithSearch(String searchTerm, PageRequest pageRequest, boolean onlyShowSentNotifications) { String lcSearchTerm = searchTerm.toLowerCase(Locale.E...
@Test public void findByIdsTest() throws Exception { NotificationEntity notificationEntity = new NotificationEntity(id, DateUtils.createCurrentDateTimestamp(), provider, providerConfigId, DateUtils.createCurrentDateTimestamp(), notificationType, content); ConfigurationModel configurationModel = createConfigurationModel...
@Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public List<AlertNotificationModel> findByIds(List<Long> notificationIds) { return toModels(notificationContentRepository.findAllById(notificationIds)); }
DefaultNotificationAccessor implements NotificationAccessor { @Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public List<AlertNotificationModel> findByIds(List<Long> notificationIds) { return toModels(notificationContentRepository.findAllById(notificationIds)); } }
DefaultNotificationAccessor implements NotificationAccessor { @Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public List<AlertNotificationModel> findByIds(List<Long> notificationIds) { return toModels(notificationContentRepository.findAllById(notificationIds)); } @Autowired DefaultNoti...
DefaultNotificationAccessor implements NotificationAccessor { @Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public List<AlertNotificationModel> findByIds(List<Long> notificationIds) { return toModels(notificationContentRepository.findAllById(notificationIds)); } @Autowired DefaultNoti...
DefaultNotificationAccessor implements NotificationAccessor { @Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public List<AlertNotificationModel> findByIds(List<Long> notificationIds) { return toModels(notificationContentRepository.findAllById(notificationIds)); } @Autowired DefaultNoti...
@Test public void findByIdTest() throws Exception { NotificationEntity notificationEntity = new NotificationEntity(id, DateUtils.createCurrentDateTimestamp(), provider, providerConfigId, DateUtils.createCurrentDateTimestamp(), notificationType, content); ConfigurationModel configurationModel = createConfigurationModel(...
@Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public Optional<AlertNotificationModel> findById(Long notificationId) { return notificationContentRepository.findById(notificationId).map(this::toModel); }
DefaultNotificationAccessor implements NotificationAccessor { @Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public Optional<AlertNotificationModel> findById(Long notificationId) { return notificationContentRepository.findById(notificationId).map(this::toModel); } }
DefaultNotificationAccessor implements NotificationAccessor { @Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public Optional<AlertNotificationModel> findById(Long notificationId) { return notificationContentRepository.findById(notificationId).map(this::toModel); } @Autowired DefaultNot...
DefaultNotificationAccessor implements NotificationAccessor { @Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public Optional<AlertNotificationModel> findById(Long notificationId) { return notificationContentRepository.findById(notificationId).map(this::toModel); } @Autowired DefaultNot...
DefaultNotificationAccessor implements NotificationAccessor { @Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public Optional<AlertNotificationModel> findById(Long notificationId) { return notificationContentRepository.findById(notificationId).map(this::toModel); } @Autowired DefaultNot...
@Test public void findByCreatedAtBetweenTest() throws Exception { NotificationEntity notificationEntity = new NotificationEntity(id, DateUtils.createCurrentDateTimestamp(), provider, providerConfigId, DateUtils.createCurrentDateTimestamp(), notificationType, content); ConfigurationModel configurationModel = createConfi...
@Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public List<AlertNotificationModel> findByCreatedAtBetween(OffsetDateTime startDate, OffsetDateTime endDate) { List<NotificationEntity> byCreatedAtBetween = notificationContentRepository.findByCreatedAtBetween(startDate, endDate); return to...
DefaultNotificationAccessor implements NotificationAccessor { @Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public List<AlertNotificationModel> findByCreatedAtBetween(OffsetDateTime startDate, OffsetDateTime endDate) { List<NotificationEntity> byCreatedAtBetween = notificationContentRe...
DefaultNotificationAccessor implements NotificationAccessor { @Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public List<AlertNotificationModel> findByCreatedAtBetween(OffsetDateTime startDate, OffsetDateTime endDate) { List<NotificationEntity> byCreatedAtBetween = notificationContentRe...
DefaultNotificationAccessor implements NotificationAccessor { @Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public List<AlertNotificationModel> findByCreatedAtBetween(OffsetDateTime startDate, OffsetDateTime endDate) { List<NotificationEntity> byCreatedAtBetween = notificationContentRe...
DefaultNotificationAccessor implements NotificationAccessor { @Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public List<AlertNotificationModel> findByCreatedAtBetween(OffsetDateTime startDate, OffsetDateTime endDate) { List<NotificationEntity> byCreatedAtBetween = notificationContentRe...
@Test public void findByCreatedAtBeforeTest() throws Exception { NotificationEntity notificationEntity = new NotificationEntity(id, DateUtils.createCurrentDateTimestamp(), provider, providerConfigId, DateUtils.createCurrentDateTimestamp(), notificationType, content); ConfigurationModel configurationModel = createConfig...
@Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public List<AlertNotificationModel> findByCreatedAtBefore(OffsetDateTime date) { List<NotificationEntity> byCreatedAtBefore = notificationContentRepository.findByCreatedAtBefore(date); return toModels(byCreatedAtBefore); }
DefaultNotificationAccessor implements NotificationAccessor { @Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public List<AlertNotificationModel> findByCreatedAtBefore(OffsetDateTime date) { List<NotificationEntity> byCreatedAtBefore = notificationContentRepository.findByCreatedAtBefore(...
DefaultNotificationAccessor implements NotificationAccessor { @Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public List<AlertNotificationModel> findByCreatedAtBefore(OffsetDateTime date) { List<NotificationEntity> byCreatedAtBefore = notificationContentRepository.findByCreatedAtBefore(...
DefaultNotificationAccessor implements NotificationAccessor { @Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public List<AlertNotificationModel> findByCreatedAtBefore(OffsetDateTime date) { List<NotificationEntity> byCreatedAtBefore = notificationContentRepository.findByCreatedAtBefore(...
DefaultNotificationAccessor implements NotificationAccessor { @Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public List<AlertNotificationModel> findByCreatedAtBefore(OffsetDateTime date) { List<NotificationEntity> byCreatedAtBefore = notificationContentRepository.findByCreatedAtBefore(...
@Test public void findByCreatedAtBeforeDayOffsetTest() throws Exception { NotificationEntity notificationEntity = new NotificationEntity(id, DateUtils.createCurrentDateTimestamp(), provider, providerConfigId, DateUtils.createCurrentDateTimestamp(), notificationType, content); ConfigurationModel configurationModel = cre...
@Override public List<AlertNotificationModel> findByCreatedAtBeforeDayOffset(int dayOffset) { OffsetDateTime searchTime = DateUtils.createCurrentDateTimestamp() .minusDays(dayOffset) .withHour(0).withMinute(0).withSecond(0).withNano(0); return findByCreatedAtBefore(searchTime); }
DefaultNotificationAccessor implements NotificationAccessor { @Override public List<AlertNotificationModel> findByCreatedAtBeforeDayOffset(int dayOffset) { OffsetDateTime searchTime = DateUtils.createCurrentDateTimestamp() .minusDays(dayOffset) .withHour(0).withMinute(0).withSecond(0).withNano(0); return findByCreatedA...
DefaultNotificationAccessor implements NotificationAccessor { @Override public List<AlertNotificationModel> findByCreatedAtBeforeDayOffset(int dayOffset) { OffsetDateTime searchTime = DateUtils.createCurrentDateTimestamp() .minusDays(dayOffset) .withHour(0).withMinute(0).withSecond(0).withNano(0); return findByCreatedA...
DefaultNotificationAccessor implements NotificationAccessor { @Override public List<AlertNotificationModel> findByCreatedAtBeforeDayOffset(int dayOffset) { OffsetDateTime searchTime = DateUtils.createCurrentDateTimestamp() .minusDays(dayOffset) .withHour(0).withMinute(0).withSecond(0).withNano(0); return findByCreatedA...
DefaultNotificationAccessor implements NotificationAccessor { @Override public List<AlertNotificationModel> findByCreatedAtBeforeDayOffset(int dayOffset) { OffsetDateTime searchTime = DateUtils.createCurrentDateTimestamp() .minusDays(dayOffset) .withHour(0).withMinute(0).withSecond(0).withNano(0); return findByCreatedA...
@Test public void deleteNotificationListTest() { AlertNotificationModel alertNotificationModel = new AlertNotificationModel(null, providerConfigId, provider, providerConfigName, notificationType, content, DateUtils.createCurrentDateTimestamp(), DateUtils.createCurrentDateTimestamp()); AuditNotificationRelation auditNot...
@Override public void deleteNotificationList(List<AlertNotificationModel> notifications) { notifications.forEach(this::deleteNotification); }
DefaultNotificationAccessor implements NotificationAccessor { @Override public void deleteNotificationList(List<AlertNotificationModel> notifications) { notifications.forEach(this::deleteNotification); } }
DefaultNotificationAccessor implements NotificationAccessor { @Override public void deleteNotificationList(List<AlertNotificationModel> notifications) { notifications.forEach(this::deleteNotification); } @Autowired DefaultNotificationAccessor(NotificationContentRepository notificationContentRepository, AuditEntryRepos...
DefaultNotificationAccessor implements NotificationAccessor { @Override public void deleteNotificationList(List<AlertNotificationModel> notifications) { notifications.forEach(this::deleteNotification); } @Autowired DefaultNotificationAccessor(NotificationContentRepository notificationContentRepository, AuditEntryRepos...
DefaultNotificationAccessor implements NotificationAccessor { @Override public void deleteNotificationList(List<AlertNotificationModel> notifications) { notifications.forEach(this::deleteNotification); } @Autowired DefaultNotificationAccessor(NotificationContentRepository notificationContentRepository, AuditEntryRepos...
@Test public void getPageRequestForNotificationsTest() { final int pageNumber = 1; final int pageSize = 1; final String sortField = "content"; String sortOrder = Sort.Direction.ASC.name(); NotificationContentRepository notificationContentRepository = Mockito.mock(NotificationContentRepository.class); AuditEntryReposito...
public PageRequest getPageRequestForNotifications(Integer pageNumber, Integer pageSize, String sortField, String sortOrder) { Integer page = ObjectUtils.defaultIfNull(pageNumber, 0); Integer size = ObjectUtils.defaultIfNull(pageSize, Integer.MAX_VALUE); boolean sortQuery = false; String sortingField = "createdAt"; if (...
DefaultNotificationAccessor implements NotificationAccessor { public PageRequest getPageRequestForNotifications(Integer pageNumber, Integer pageSize, String sortField, String sortOrder) { Integer page = ObjectUtils.defaultIfNull(pageNumber, 0); Integer size = ObjectUtils.defaultIfNull(pageSize, Integer.MAX_VALUE); bool...
DefaultNotificationAccessor implements NotificationAccessor { public PageRequest getPageRequestForNotifications(Integer pageNumber, Integer pageSize, String sortField, String sortOrder) { Integer page = ObjectUtils.defaultIfNull(pageNumber, 0); Integer size = ObjectUtils.defaultIfNull(pageSize, Integer.MAX_VALUE); bool...
DefaultNotificationAccessor implements NotificationAccessor { public PageRequest getPageRequestForNotifications(Integer pageNumber, Integer pageSize, String sortField, String sortOrder) { Integer page = ObjectUtils.defaultIfNull(pageNumber, 0); Integer size = ObjectUtils.defaultIfNull(pageSize, Integer.MAX_VALUE); bool...
DefaultNotificationAccessor implements NotificationAccessor { public PageRequest getPageRequestForNotifications(Integer pageNumber, Integer pageSize, String sortField, String sortOrder) { Integer page = ObjectUtils.defaultIfNull(pageNumber, 0); Integer size = ObjectUtils.defaultIfNull(pageSize, Integer.MAX_VALUE); bool...
@Test public void getCertificatesTest() { CustomCertificateRepository customCertificateRepository = new MockCustomCertificateRepository(alias, content, testDate); DefaultCustomCertificateAccessor customCertificateAccessor = new DefaultCustomCertificateAccessor(customCertificateRepository); List<CustomCertificateModel> ...
@Override public List<CustomCertificateModel> getCertificates() { return customCertificateRepository.findAll() .stream() .map(this::createModel) .collect(Collectors.toList()); }
DefaultCustomCertificateAccessor implements CustomCertificateAccessor { @Override public List<CustomCertificateModel> getCertificates() { return customCertificateRepository.findAll() .stream() .map(this::createModel) .collect(Collectors.toList()); } }
DefaultCustomCertificateAccessor implements CustomCertificateAccessor { @Override public List<CustomCertificateModel> getCertificates() { return customCertificateRepository.findAll() .stream() .map(this::createModel) .collect(Collectors.toList()); } @Autowired DefaultCustomCertificateAccessor(CustomCertificateReposito...
DefaultCustomCertificateAccessor implements CustomCertificateAccessor { @Override public List<CustomCertificateModel> getCertificates() { return customCertificateRepository.findAll() .stream() .map(this::createModel) .collect(Collectors.toList()); } @Autowired DefaultCustomCertificateAccessor(CustomCertificateReposito...
DefaultCustomCertificateAccessor implements CustomCertificateAccessor { @Override public List<CustomCertificateModel> getCertificates() { return customCertificateRepository.findAll() .stream() .map(this::createModel) .collect(Collectors.toList()); } @Autowired DefaultCustomCertificateAccessor(CustomCertificateReposito...
@Test public void getUsersByProviderConfigIdTest() { ProviderUserEntity providerUserEntity = new ProviderUserEntity(projectOwnerEmail, true, 1L); ProviderProjectRepository providerProjectRepository = Mockito.mock(ProviderProjectRepository.class); ProviderUserRepository providerUserRepository = Mockito.mock(ProviderUser...
@Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public List<ProviderUserModel> getUsersByProviderConfigId(Long providerConfigId) { if (null == providerConfigId) { return List.of(); } return providerUserRepository.findByProviderConfigId(providerConfigId) .stream() .map(this::convertToUser...
DefaultProviderDataAccessor implements ProviderDataAccessor { @Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public List<ProviderUserModel> getUsersByProviderConfigId(Long providerConfigId) { if (null == providerConfigId) { return List.of(); } return providerUserRepository.findByProvide...
DefaultProviderDataAccessor implements ProviderDataAccessor { @Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public List<ProviderUserModel> getUsersByProviderConfigId(Long providerConfigId) { if (null == providerConfigId) { return List.of(); } return providerUserRepository.findByProvide...
DefaultProviderDataAccessor implements ProviderDataAccessor { @Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public List<ProviderUserModel> getUsersByProviderConfigId(Long providerConfigId) { if (null == providerConfigId) { return List.of(); } return providerUserRepository.findByProvide...
DefaultProviderDataAccessor implements ProviderDataAccessor { @Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public List<ProviderUserModel> getUsersByProviderConfigId(Long providerConfigId) { if (null == providerConfigId) { return List.of(); } return providerUserRepository.findByProvide...
@Test public void getCertificateTest() { CustomCertificateRepository customCertificateRepository = new MockCustomCertificateRepository(alias, content, testDate); DefaultCustomCertificateAccessor customCertificateAccessor = new DefaultCustomCertificateAccessor(customCertificateRepository); Optional<CustomCertificateMode...
@Override public Optional<CustomCertificateModel> getCertificate(Long id) { return customCertificateRepository.findById(id) .map(this::createModel); }
DefaultCustomCertificateAccessor implements CustomCertificateAccessor { @Override public Optional<CustomCertificateModel> getCertificate(Long id) { return customCertificateRepository.findById(id) .map(this::createModel); } }
DefaultCustomCertificateAccessor implements CustomCertificateAccessor { @Override public Optional<CustomCertificateModel> getCertificate(Long id) { return customCertificateRepository.findById(id) .map(this::createModel); } @Autowired DefaultCustomCertificateAccessor(CustomCertificateRepository customCertificateReposit...
DefaultCustomCertificateAccessor implements CustomCertificateAccessor { @Override public Optional<CustomCertificateModel> getCertificate(Long id) { return customCertificateRepository.findById(id) .map(this::createModel); } @Autowired DefaultCustomCertificateAccessor(CustomCertificateRepository customCertificateReposit...
DefaultCustomCertificateAccessor implements CustomCertificateAccessor { @Override public Optional<CustomCertificateModel> getCertificate(Long id) { return customCertificateRepository.findById(id) .map(this::createModel); } @Autowired DefaultCustomCertificateAccessor(CustomCertificateRepository customCertificateReposit...
@Test public void storeCertificateTest() throws Exception { CustomCertificateModel certificateModel = new CustomCertificateModel(alias, content, testDate.toString()); CustomCertificateRepository customCertificateRepository = new MockCustomCertificateRepository(); DefaultCustomCertificateAccessor customCertificateAccess...
@Override public CustomCertificateModel storeCertificate(CustomCertificateModel certificateModel) throws AlertDatabaseConstraintException { if (null == certificateModel) { throw new AlertDatabaseConstraintException("The certificate model cannot be null"); } String alias = certificateModel.getAlias(); if (StringUtils.is...
DefaultCustomCertificateAccessor implements CustomCertificateAccessor { @Override public CustomCertificateModel storeCertificate(CustomCertificateModel certificateModel) throws AlertDatabaseConstraintException { if (null == certificateModel) { throw new AlertDatabaseConstraintException("The certificate model cannot be ...
DefaultCustomCertificateAccessor implements CustomCertificateAccessor { @Override public CustomCertificateModel storeCertificate(CustomCertificateModel certificateModel) throws AlertDatabaseConstraintException { if (null == certificateModel) { throw new AlertDatabaseConstraintException("The certificate model cannot be ...
DefaultCustomCertificateAccessor implements CustomCertificateAccessor { @Override public CustomCertificateModel storeCertificate(CustomCertificateModel certificateModel) throws AlertDatabaseConstraintException { if (null == certificateModel) { throw new AlertDatabaseConstraintException("The certificate model cannot be ...
DefaultCustomCertificateAccessor implements CustomCertificateAccessor { @Override public CustomCertificateModel storeCertificate(CustomCertificateModel certificateModel) throws AlertDatabaseConstraintException { if (null == certificateModel) { throw new AlertDatabaseConstraintException("The certificate model cannot be ...
@Test public void storeCertificateNullTest() throws Exception { CustomCertificateRepository customCertificateRepository = new MockCustomCertificateRepository(); DefaultCustomCertificateAccessor customCertificateAccessor = new DefaultCustomCertificateAccessor(customCertificateRepository); try { customCertificateAccessor...
@Override public CustomCertificateModel storeCertificate(CustomCertificateModel certificateModel) throws AlertDatabaseConstraintException { if (null == certificateModel) { throw new AlertDatabaseConstraintException("The certificate model cannot be null"); } String alias = certificateModel.getAlias(); if (StringUtils.is...
DefaultCustomCertificateAccessor implements CustomCertificateAccessor { @Override public CustomCertificateModel storeCertificate(CustomCertificateModel certificateModel) throws AlertDatabaseConstraintException { if (null == certificateModel) { throw new AlertDatabaseConstraintException("The certificate model cannot be ...
DefaultCustomCertificateAccessor implements CustomCertificateAccessor { @Override public CustomCertificateModel storeCertificate(CustomCertificateModel certificateModel) throws AlertDatabaseConstraintException { if (null == certificateModel) { throw new AlertDatabaseConstraintException("The certificate model cannot be ...
DefaultCustomCertificateAccessor implements CustomCertificateAccessor { @Override public CustomCertificateModel storeCertificate(CustomCertificateModel certificateModel) throws AlertDatabaseConstraintException { if (null == certificateModel) { throw new AlertDatabaseConstraintException("The certificate model cannot be ...
DefaultCustomCertificateAccessor implements CustomCertificateAccessor { @Override public CustomCertificateModel storeCertificate(CustomCertificateModel certificateModel) throws AlertDatabaseConstraintException { if (null == certificateModel) { throw new AlertDatabaseConstraintException("The certificate model cannot be ...
@Test public void storeCertificateBlankValuesTest() throws Exception { CustomCertificateRepository customCertificateRepository = new MockCustomCertificateRepository(); DefaultCustomCertificateAccessor customCertificateAccessor = new DefaultCustomCertificateAccessor(customCertificateRepository); try { CustomCertificateM...
@Override public CustomCertificateModel storeCertificate(CustomCertificateModel certificateModel) throws AlertDatabaseConstraintException { if (null == certificateModel) { throw new AlertDatabaseConstraintException("The certificate model cannot be null"); } String alias = certificateModel.getAlias(); if (StringUtils.is...
DefaultCustomCertificateAccessor implements CustomCertificateAccessor { @Override public CustomCertificateModel storeCertificate(CustomCertificateModel certificateModel) throws AlertDatabaseConstraintException { if (null == certificateModel) { throw new AlertDatabaseConstraintException("The certificate model cannot be ...
DefaultCustomCertificateAccessor implements CustomCertificateAccessor { @Override public CustomCertificateModel storeCertificate(CustomCertificateModel certificateModel) throws AlertDatabaseConstraintException { if (null == certificateModel) { throw new AlertDatabaseConstraintException("The certificate model cannot be ...
DefaultCustomCertificateAccessor implements CustomCertificateAccessor { @Override public CustomCertificateModel storeCertificate(CustomCertificateModel certificateModel) throws AlertDatabaseConstraintException { if (null == certificateModel) { throw new AlertDatabaseConstraintException("The certificate model cannot be ...
DefaultCustomCertificateAccessor implements CustomCertificateAccessor { @Override public CustomCertificateModel storeCertificate(CustomCertificateModel certificateModel) throws AlertDatabaseConstraintException { if (null == certificateModel) { throw new AlertDatabaseConstraintException("The certificate model cannot be ...
@Test public void storeCertificateIdDoesNotExistTest() throws Exception { CustomCertificateRepository customCertificateRepository = new MockCustomCertificateRepository(); DefaultCustomCertificateAccessor customCertificateAccessor = new DefaultCustomCertificateAccessor(customCertificateRepository); try { CustomCertifica...
@Override public CustomCertificateModel storeCertificate(CustomCertificateModel certificateModel) throws AlertDatabaseConstraintException { if (null == certificateModel) { throw new AlertDatabaseConstraintException("The certificate model cannot be null"); } String alias = certificateModel.getAlias(); if (StringUtils.is...
DefaultCustomCertificateAccessor implements CustomCertificateAccessor { @Override public CustomCertificateModel storeCertificate(CustomCertificateModel certificateModel) throws AlertDatabaseConstraintException { if (null == certificateModel) { throw new AlertDatabaseConstraintException("The certificate model cannot be ...
DefaultCustomCertificateAccessor implements CustomCertificateAccessor { @Override public CustomCertificateModel storeCertificate(CustomCertificateModel certificateModel) throws AlertDatabaseConstraintException { if (null == certificateModel) { throw new AlertDatabaseConstraintException("The certificate model cannot be ...
DefaultCustomCertificateAccessor implements CustomCertificateAccessor { @Override public CustomCertificateModel storeCertificate(CustomCertificateModel certificateModel) throws AlertDatabaseConstraintException { if (null == certificateModel) { throw new AlertDatabaseConstraintException("The certificate model cannot be ...
DefaultCustomCertificateAccessor implements CustomCertificateAccessor { @Override public CustomCertificateModel storeCertificate(CustomCertificateModel certificateModel) throws AlertDatabaseConstraintException { if (null == certificateModel) { throw new AlertDatabaseConstraintException("The certificate model cannot be ...
@Test public void deleteCertificateByAliasBlankTest() throws Exception { CustomCertificateRepository customCertificateRepository = new MockCustomCertificateRepository(alias, content, testDate); DefaultCustomCertificateAccessor customCertificateAccessor = new DefaultCustomCertificateAccessor(customCertificateRepository)...
@Override public void deleteCertificate(String certificateAlias) throws AlertDatabaseConstraintException { if (StringUtils.isBlank(certificateAlias)) { throw new AlertDatabaseConstraintException("The field 'certificateAlias' cannot be blank"); } CustomCertificateEntity customCertificateEntity = customCertificateReposit...
DefaultCustomCertificateAccessor implements CustomCertificateAccessor { @Override public void deleteCertificate(String certificateAlias) throws AlertDatabaseConstraintException { if (StringUtils.isBlank(certificateAlias)) { throw new AlertDatabaseConstraintException("The field 'certificateAlias' cannot be blank"); } Cu...
DefaultCustomCertificateAccessor implements CustomCertificateAccessor { @Override public void deleteCertificate(String certificateAlias) throws AlertDatabaseConstraintException { if (StringUtils.isBlank(certificateAlias)) { throw new AlertDatabaseConstraintException("The field 'certificateAlias' cannot be blank"); } Cu...
DefaultCustomCertificateAccessor implements CustomCertificateAccessor { @Override public void deleteCertificate(String certificateAlias) throws AlertDatabaseConstraintException { if (StringUtils.isBlank(certificateAlias)) { throw new AlertDatabaseConstraintException("The field 'certificateAlias' cannot be blank"); } Cu...
DefaultCustomCertificateAccessor implements CustomCertificateAccessor { @Override public void deleteCertificate(String certificateAlias) throws AlertDatabaseConstraintException { if (StringUtils.isBlank(certificateAlias)) { throw new AlertDatabaseConstraintException("The field 'certificateAlias' cannot be blank"); } Cu...
@Test public void deleteCertificateByIdNullTest() throws Exception { CustomCertificateRepository customCertificateRepository = new MockCustomCertificateRepository(alias, content, testDate); DefaultCustomCertificateAccessor customCertificateAccessor = new DefaultCustomCertificateAccessor(customCertificateRepository); tr...
@Override public void deleteCertificate(String certificateAlias) throws AlertDatabaseConstraintException { if (StringUtils.isBlank(certificateAlias)) { throw new AlertDatabaseConstraintException("The field 'certificateAlias' cannot be blank"); } CustomCertificateEntity customCertificateEntity = customCertificateReposit...
DefaultCustomCertificateAccessor implements CustomCertificateAccessor { @Override public void deleteCertificate(String certificateAlias) throws AlertDatabaseConstraintException { if (StringUtils.isBlank(certificateAlias)) { throw new AlertDatabaseConstraintException("The field 'certificateAlias' cannot be blank"); } Cu...
DefaultCustomCertificateAccessor implements CustomCertificateAccessor { @Override public void deleteCertificate(String certificateAlias) throws AlertDatabaseConstraintException { if (StringUtils.isBlank(certificateAlias)) { throw new AlertDatabaseConstraintException("The field 'certificateAlias' cannot be blank"); } Cu...
DefaultCustomCertificateAccessor implements CustomCertificateAccessor { @Override public void deleteCertificate(String certificateAlias) throws AlertDatabaseConstraintException { if (StringUtils.isBlank(certificateAlias)) { throw new AlertDatabaseConstraintException("The field 'certificateAlias' cannot be blank"); } Cu...
DefaultCustomCertificateAccessor implements CustomCertificateAccessor { @Override public void deleteCertificate(String certificateAlias) throws AlertDatabaseConstraintException { if (StringUtils.isBlank(certificateAlias)) { throw new AlertDatabaseConstraintException("The field 'certificateAlias' cannot be blank"); } Cu...
@Test public void isSystemInitializedTest() { SystemStatusRepository systemStatusRepository = Mockito.mock(SystemStatusRepository.class); SystemStatusEntity systemStatus = new SystemStatusEntity(Boolean.TRUE, DateUtils.createCurrentDateTimestamp()); Mockito.when(systemStatusRepository.findById(Mockito.any())).thenRetur...
@Override @Transactional public boolean isSystemInitialized() { return getSystemStatus().isInitialConfigurationPerformed(); }
DefaultSystemStatusAccessor implements SystemStatusAccessor { @Override @Transactional public boolean isSystemInitialized() { return getSystemStatus().isInitialConfigurationPerformed(); } }
DefaultSystemStatusAccessor implements SystemStatusAccessor { @Override @Transactional public boolean isSystemInitialized() { return getSystemStatus().isInitialConfigurationPerformed(); } @Autowired DefaultSystemStatusAccessor(SystemStatusRepository systemStatusRepository); }
DefaultSystemStatusAccessor implements SystemStatusAccessor { @Override @Transactional public boolean isSystemInitialized() { return getSystemStatus().isInitialConfigurationPerformed(); } @Autowired DefaultSystemStatusAccessor(SystemStatusRepository systemStatusRepository); @Override @Transactional boolean isSystemIni...
DefaultSystemStatusAccessor implements SystemStatusAccessor { @Override @Transactional public boolean isSystemInitialized() { return getSystemStatus().isInitialConfigurationPerformed(); } @Autowired DefaultSystemStatusAccessor(SystemStatusRepository systemStatusRepository); @Override @Transactional boolean isSystemIni...
@Test public void setSystemInitializedTest() { SystemStatusRepository systemStatusRepository = new MockSystemStatusRepository(Boolean.FALSE); DefaultSystemStatusAccessor systemStatusUtility = new DefaultSystemStatusAccessor(systemStatusRepository); systemStatusUtility.setSystemInitialized(Boolean.TRUE); SystemStatusEnt...
@Override @Transactional public void setSystemInitialized(boolean systemInitialized) { SystemStatusEntity systemStatus = getSystemStatus(); SystemStatusEntity newSystemStatus = new SystemStatusEntity(systemInitialized, systemStatus.getStartupTime()); updateSystemStatus(newSystemStatus); }
DefaultSystemStatusAccessor implements SystemStatusAccessor { @Override @Transactional public void setSystemInitialized(boolean systemInitialized) { SystemStatusEntity systemStatus = getSystemStatus(); SystemStatusEntity newSystemStatus = new SystemStatusEntity(systemInitialized, systemStatus.getStartupTime()); updateS...
DefaultSystemStatusAccessor implements SystemStatusAccessor { @Override @Transactional public void setSystemInitialized(boolean systemInitialized) { SystemStatusEntity systemStatus = getSystemStatus(); SystemStatusEntity newSystemStatus = new SystemStatusEntity(systemInitialized, systemStatus.getStartupTime()); updateS...
DefaultSystemStatusAccessor implements SystemStatusAccessor { @Override @Transactional public void setSystemInitialized(boolean systemInitialized) { SystemStatusEntity systemStatus = getSystemStatus(); SystemStatusEntity newSystemStatus = new SystemStatusEntity(systemInitialized, systemStatus.getStartupTime()); updateS...
DefaultSystemStatusAccessor implements SystemStatusAccessor { @Override @Transactional public void setSystemInitialized(boolean systemInitialized) { SystemStatusEntity systemStatus = getSystemStatus(); SystemStatusEntity newSystemStatus = new SystemStatusEntity(systemInitialized, systemStatus.getStartupTime()); updateS...
@Test public void startupOccurred() { SystemStatusRepository systemStatusRepository = new MockSystemStatusRepository(Boolean.FALSE); DefaultSystemStatusAccessor systemStatusUtility = new DefaultSystemStatusAccessor(systemStatusRepository); systemStatusUtility.startupOccurred(); LocalDateTime estimatedDate = LocalDateTi...
@Override @Transactional public void startupOccurred() { SystemStatusEntity systemStatus = getSystemStatus(); SystemStatusEntity newSystemStatus = new SystemStatusEntity(systemStatus.isInitialConfigurationPerformed(), createCurrentDateTimestamp()); updateSystemStatus(newSystemStatus); }
DefaultSystemStatusAccessor implements SystemStatusAccessor { @Override @Transactional public void startupOccurred() { SystemStatusEntity systemStatus = getSystemStatus(); SystemStatusEntity newSystemStatus = new SystemStatusEntity(systemStatus.isInitialConfigurationPerformed(), createCurrentDateTimestamp()); updateSys...
DefaultSystemStatusAccessor implements SystemStatusAccessor { @Override @Transactional public void startupOccurred() { SystemStatusEntity systemStatus = getSystemStatus(); SystemStatusEntity newSystemStatus = new SystemStatusEntity(systemStatus.isInitialConfigurationPerformed(), createCurrentDateTimestamp()); updateSys...
DefaultSystemStatusAccessor implements SystemStatusAccessor { @Override @Transactional public void startupOccurred() { SystemStatusEntity systemStatus = getSystemStatus(); SystemStatusEntity newSystemStatus = new SystemStatusEntity(systemStatus.isInitialConfigurationPerformed(), createCurrentDateTimestamp()); updateSys...
DefaultSystemStatusAccessor implements SystemStatusAccessor { @Override @Transactional public void startupOccurred() { SystemStatusEntity systemStatus = getSystemStatus(); SystemStatusEntity newSystemStatus = new SystemStatusEntity(systemStatus.isInitialConfigurationPerformed(), createCurrentDateTimestamp()); updateSys...
@Test public void getUsersByProviderConfigIdNullTest() { DefaultProviderDataAccessor providerDataAccessor = new DefaultProviderDataAccessor(null, null, null, null); List<ProviderUserModel> providerUserModelList = providerDataAccessor.getUsersByProviderConfigId(null); assertTrue(providerUserModelList.isEmpty()); }
@Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public List<ProviderUserModel> getUsersByProviderConfigId(Long providerConfigId) { if (null == providerConfigId) { return List.of(); } return providerUserRepository.findByProviderConfigId(providerConfigId) .stream() .map(this::convertToUser...
DefaultProviderDataAccessor implements ProviderDataAccessor { @Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public List<ProviderUserModel> getUsersByProviderConfigId(Long providerConfigId) { if (null == providerConfigId) { return List.of(); } return providerUserRepository.findByProvide...
DefaultProviderDataAccessor implements ProviderDataAccessor { @Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public List<ProviderUserModel> getUsersByProviderConfigId(Long providerConfigId) { if (null == providerConfigId) { return List.of(); } return providerUserRepository.findByProvide...
DefaultProviderDataAccessor implements ProviderDataAccessor { @Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public List<ProviderUserModel> getUsersByProviderConfigId(Long providerConfigId) { if (null == providerConfigId) { return List.of(); } return providerUserRepository.findByProvide...
DefaultProviderDataAccessor implements ProviderDataAccessor { @Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public List<ProviderUserModel> getUsersByProviderConfigId(Long providerConfigId) { if (null == providerConfigId) { return List.of(); } return providerUserRepository.findByProvide...
@Test public void getStartupTime() { SystemStatusRepository systemStatusRepository = Mockito.mock(SystemStatusRepository.class); OffsetDateTime date = DateUtils.createCurrentDateTimestamp(); SystemStatusEntity systemStatus = new SystemStatusEntity(Boolean.TRUE, date); Mockito.when(systemStatusRepository.findById(Mockit...
@Override @Transactional public OffsetDateTime getStartupTime() { return getSystemStatus().getStartupTime(); }
DefaultSystemStatusAccessor implements SystemStatusAccessor { @Override @Transactional public OffsetDateTime getStartupTime() { return getSystemStatus().getStartupTime(); } }
DefaultSystemStatusAccessor implements SystemStatusAccessor { @Override @Transactional public OffsetDateTime getStartupTime() { return getSystemStatus().getStartupTime(); } @Autowired DefaultSystemStatusAccessor(SystemStatusRepository systemStatusRepository); }
DefaultSystemStatusAccessor implements SystemStatusAccessor { @Override @Transactional public OffsetDateTime getStartupTime() { return getSystemStatus().getStartupTime(); } @Autowired DefaultSystemStatusAccessor(SystemStatusRepository systemStatusRepository); @Override @Transactional boolean isSystemInitialized(); @Ov...
DefaultSystemStatusAccessor implements SystemStatusAccessor { @Override @Transactional public OffsetDateTime getStartupTime() { return getSystemStatus().getStartupTime(); } @Autowired DefaultSystemStatusAccessor(SystemStatusRepository systemStatusRepository); @Override @Transactional boolean isSystemInitialized(); @Ov...
@Test public void getRolesTest() { RoleEntity roleEntity = new RoleEntity(DefaultUserRole.ALERT_USER.name(), true); roleEntity.setId(1L); Mockito.when(roleRepository.findAll()).thenReturn(List.of(roleEntity)); DefaultRoleAccessor authorizationUtility = new DefaultRoleAccessor(roleRepository, userRoleRepository, permiss...
@Override public Set<UserRoleModel> getRoles() { List<RoleEntity> roleList = roleRepository.findAll(); Set<UserRoleModel> userRoles = new LinkedHashSet<>(); for (RoleEntity entity : roleList) { userRoles.add(new UserRoleModel(entity.getId(), entity.getRoleName(), entity.getCustom(), readPermissionsForRole(entity.getId(...
DefaultRoleAccessor implements RoleAccessor { @Override public Set<UserRoleModel> getRoles() { List<RoleEntity> roleList = roleRepository.findAll(); Set<UserRoleModel> userRoles = new LinkedHashSet<>(); for (RoleEntity entity : roleList) { userRoles.add(new UserRoleModel(entity.getId(), entity.getRoleName(), entity.get...
DefaultRoleAccessor implements RoleAccessor { @Override public Set<UserRoleModel> getRoles() { List<RoleEntity> roleList = roleRepository.findAll(); Set<UserRoleModel> userRoles = new LinkedHashSet<>(); for (RoleEntity entity : roleList) { userRoles.add(new UserRoleModel(entity.getId(), entity.getRoleName(), entity.get...
DefaultRoleAccessor implements RoleAccessor { @Override public Set<UserRoleModel> getRoles() { List<RoleEntity> roleList = roleRepository.findAll(); Set<UserRoleModel> userRoles = new LinkedHashSet<>(); for (RoleEntity entity : roleList) { userRoles.add(new UserRoleModel(entity.getId(), entity.getRoleName(), entity.get...
DefaultRoleAccessor implements RoleAccessor { @Override public Set<UserRoleModel> getRoles() { List<RoleEntity> roleList = roleRepository.findAll(); Set<UserRoleModel> userRoles = new LinkedHashSet<>(); for (RoleEntity entity : roleList) { userRoles.add(new UserRoleModel(entity.getId(), entity.getRoleName(), entity.get...
@Test public void getRolesByRoleIdsTest() { RoleEntity roleEntity = new RoleEntity(DefaultUserRole.ALERT_USER.name(), true); roleEntity.setId(1L); Mockito.when(roleRepository.findById(Mockito.any())).thenReturn(Optional.of(roleEntity)); DefaultRoleAccessor authorizationUtility = new DefaultRoleAccessor(roleRepository, ...
@Override public Set<UserRoleModel> getRoles() { List<RoleEntity> roleList = roleRepository.findAll(); Set<UserRoleModel> userRoles = new LinkedHashSet<>(); for (RoleEntity entity : roleList) { userRoles.add(new UserRoleModel(entity.getId(), entity.getRoleName(), entity.getCustom(), readPermissionsForRole(entity.getId(...
DefaultRoleAccessor implements RoleAccessor { @Override public Set<UserRoleModel> getRoles() { List<RoleEntity> roleList = roleRepository.findAll(); Set<UserRoleModel> userRoles = new LinkedHashSet<>(); for (RoleEntity entity : roleList) { userRoles.add(new UserRoleModel(entity.getId(), entity.getRoleName(), entity.get...
DefaultRoleAccessor implements RoleAccessor { @Override public Set<UserRoleModel> getRoles() { List<RoleEntity> roleList = roleRepository.findAll(); Set<UserRoleModel> userRoles = new LinkedHashSet<>(); for (RoleEntity entity : roleList) { userRoles.add(new UserRoleModel(entity.getId(), entity.getRoleName(), entity.get...
DefaultRoleAccessor implements RoleAccessor { @Override public Set<UserRoleModel> getRoles() { List<RoleEntity> roleList = roleRepository.findAll(); Set<UserRoleModel> userRoles = new LinkedHashSet<>(); for (RoleEntity entity : roleList) { userRoles.add(new UserRoleModel(entity.getId(), entity.getRoleName(), entity.get...
DefaultRoleAccessor implements RoleAccessor { @Override public Set<UserRoleModel> getRoles() { List<RoleEntity> roleList = roleRepository.findAll(); Set<UserRoleModel> userRoles = new LinkedHashSet<>(); for (RoleEntity entity : roleList) { userRoles.add(new UserRoleModel(entity.getId(), entity.getRoleName(), entity.get...
@Test public void doesRoleNameExistTest() { Mockito.when(roleRepository.existsRoleEntityByRoleName(Mockito.any())).thenReturn(true); DefaultRoleAccessor authorizationUtility = new DefaultRoleAccessor(roleRepository, userRoleRepository, permissionMatrixRepository, registeredDescriptorRepository, configContextRepository)...
@Override public boolean doesRoleNameExist(String name) { return roleRepository.existsRoleEntityByRoleName(name); }
DefaultRoleAccessor implements RoleAccessor { @Override public boolean doesRoleNameExist(String name) { return roleRepository.existsRoleEntityByRoleName(name); } }
DefaultRoleAccessor implements RoleAccessor { @Override public boolean doesRoleNameExist(String name) { return roleRepository.existsRoleEntityByRoleName(name); } @Autowired DefaultRoleAccessor(RoleRepository roleRepository, UserRoleRepository userRoleRepository, PermissionMatrixRepository permissionMatrixRepository, ...
DefaultRoleAccessor implements RoleAccessor { @Override public boolean doesRoleNameExist(String name) { return roleRepository.existsRoleEntityByRoleName(name); } @Autowired DefaultRoleAccessor(RoleRepository roleRepository, UserRoleRepository userRoleRepository, PermissionMatrixRepository permissionMatrixRepository, ...
DefaultRoleAccessor implements RoleAccessor { @Override public boolean doesRoleNameExist(String name) { return roleRepository.existsRoleEntityByRoleName(name); } @Autowired DefaultRoleAccessor(RoleRepository roleRepository, UserRoleRepository userRoleRepository, PermissionMatrixRepository permissionMatrixRepository, ...
@Test public void createRoleTest() throws Exception { final String roleName = "roleName"; Mockito.when(roleRepository.save(Mockito.any())).thenReturn(new RoleEntity(roleName, true)); DefaultRoleAccessor authorizationUtility = new DefaultRoleAccessor(roleRepository, userRoleRepository, permissionMatrixRepository, regist...
@Override public UserRoleModel createRole(String roleName) throws AlertDatabaseConstraintException { RoleEntity dbRole = createRole(roleName, true); return UserRoleModel.of(dbRole.getRoleName(), dbRole.getCustom()); }
DefaultRoleAccessor implements RoleAccessor { @Override public UserRoleModel createRole(String roleName) throws AlertDatabaseConstraintException { RoleEntity dbRole = createRole(roleName, true); return UserRoleModel.of(dbRole.getRoleName(), dbRole.getCustom()); } }
DefaultRoleAccessor implements RoleAccessor { @Override public UserRoleModel createRole(String roleName) throws AlertDatabaseConstraintException { RoleEntity dbRole = createRole(roleName, true); return UserRoleModel.of(dbRole.getRoleName(), dbRole.getCustom()); } @Autowired DefaultRoleAccessor(RoleRepository roleRepos...
DefaultRoleAccessor implements RoleAccessor { @Override public UserRoleModel createRole(String roleName) throws AlertDatabaseConstraintException { RoleEntity dbRole = createRole(roleName, true); return UserRoleModel.of(dbRole.getRoleName(), dbRole.getCustom()); } @Autowired DefaultRoleAccessor(RoleRepository roleRepos...
DefaultRoleAccessor implements RoleAccessor { @Override public UserRoleModel createRole(String roleName) throws AlertDatabaseConstraintException { RoleEntity dbRole = createRole(roleName, true); return UserRoleModel.of(dbRole.getRoleName(), dbRole.getCustom()); } @Autowired DefaultRoleAccessor(RoleRepository roleRepos...
@Test public void createRoleNullTest() throws Exception { DefaultRoleAccessor authorizationUtility = new DefaultRoleAccessor(roleRepository, userRoleRepository, permissionMatrixRepository, registeredDescriptorRepository, configContextRepository); try { authorizationUtility.createRole(""); fail("Blank roleName did not t...
@Override public UserRoleModel createRole(String roleName) throws AlertDatabaseConstraintException { RoleEntity dbRole = createRole(roleName, true); return UserRoleModel.of(dbRole.getRoleName(), dbRole.getCustom()); }
DefaultRoleAccessor implements RoleAccessor { @Override public UserRoleModel createRole(String roleName) throws AlertDatabaseConstraintException { RoleEntity dbRole = createRole(roleName, true); return UserRoleModel.of(dbRole.getRoleName(), dbRole.getCustom()); } }
DefaultRoleAccessor implements RoleAccessor { @Override public UserRoleModel createRole(String roleName) throws AlertDatabaseConstraintException { RoleEntity dbRole = createRole(roleName, true); return UserRoleModel.of(dbRole.getRoleName(), dbRole.getCustom()); } @Autowired DefaultRoleAccessor(RoleRepository roleRepos...
DefaultRoleAccessor implements RoleAccessor { @Override public UserRoleModel createRole(String roleName) throws AlertDatabaseConstraintException { RoleEntity dbRole = createRole(roleName, true); return UserRoleModel.of(dbRole.getRoleName(), dbRole.getCustom()); } @Autowired DefaultRoleAccessor(RoleRepository roleRepos...
DefaultRoleAccessor implements RoleAccessor { @Override public UserRoleModel createRole(String roleName) throws AlertDatabaseConstraintException { RoleEntity dbRole = createRole(roleName, true); return UserRoleModel.of(dbRole.getRoleName(), dbRole.getCustom()); } @Autowired DefaultRoleAccessor(RoleRepository roleRepos...
@Test public void createRoleWithPermissions() throws Exception { final String roleName = "roleName"; final String contextString = "context-test"; final String descriptorName = "descriptorName"; RoleEntity roleEntity = new RoleEntity(roleName, true); roleEntity.setId(1L); ConfigContextEntity configContextEntity = new Co...
@Override public UserRoleModel createRoleWithPermissions(String roleName, PermissionMatrixModel permissionMatrix) throws AlertDatabaseConstraintException { RoleEntity roleEntity = createRole(roleName, true); List<PermissionMatrixRelation> permissions = updateRoleOperations(roleEntity, permissionMatrix); return new User...
DefaultRoleAccessor implements RoleAccessor { @Override public UserRoleModel createRoleWithPermissions(String roleName, PermissionMatrixModel permissionMatrix) throws AlertDatabaseConstraintException { RoleEntity roleEntity = createRole(roleName, true); List<PermissionMatrixRelation> permissions = updateRoleOperations(...
DefaultRoleAccessor implements RoleAccessor { @Override public UserRoleModel createRoleWithPermissions(String roleName, PermissionMatrixModel permissionMatrix) throws AlertDatabaseConstraintException { RoleEntity roleEntity = createRole(roleName, true); List<PermissionMatrixRelation> permissions = updateRoleOperations(...
DefaultRoleAccessor implements RoleAccessor { @Override public UserRoleModel createRoleWithPermissions(String roleName, PermissionMatrixModel permissionMatrix) throws AlertDatabaseConstraintException { RoleEntity roleEntity = createRole(roleName, true); List<PermissionMatrixRelation> permissions = updateRoleOperations(...
DefaultRoleAccessor implements RoleAccessor { @Override public UserRoleModel createRoleWithPermissions(String roleName, PermissionMatrixModel permissionMatrix) throws AlertDatabaseConstraintException { RoleEntity roleEntity = createRole(roleName, true); List<PermissionMatrixRelation> permissions = updateRoleOperations(...
@Test public void updateRoleNameTest() throws Exception { final String roleName = "roleName"; final Long roleId = 1L; RoleEntity roleEntity = new RoleEntity(DefaultUserRole.ALERT_USER.name(), true); roleEntity.setId(1L); Mockito.when(roleRepository.findById(Mockito.any())).thenReturn(Optional.of(roleEntity)); DefaultRo...
@Override public void updateRoleName(Long roleId, String roleName) throws AlertDatabaseConstraintException { Optional<RoleEntity> foundRole = roleRepository.findById(roleId); if (foundRole.isPresent()) { RoleEntity roleEntity = foundRole.get(); if (BooleanUtils.isFalse(roleEntity.getCustom())) { throw new AlertDatabase...
DefaultRoleAccessor implements RoleAccessor { @Override public void updateRoleName(Long roleId, String roleName) throws AlertDatabaseConstraintException { Optional<RoleEntity> foundRole = roleRepository.findById(roleId); if (foundRole.isPresent()) { RoleEntity roleEntity = foundRole.get(); if (BooleanUtils.isFalse(role...
DefaultRoleAccessor implements RoleAccessor { @Override public void updateRoleName(Long roleId, String roleName) throws AlertDatabaseConstraintException { Optional<RoleEntity> foundRole = roleRepository.findById(roleId); if (foundRole.isPresent()) { RoleEntity roleEntity = foundRole.get(); if (BooleanUtils.isFalse(role...
DefaultRoleAccessor implements RoleAccessor { @Override public void updateRoleName(Long roleId, String roleName) throws AlertDatabaseConstraintException { Optional<RoleEntity> foundRole = roleRepository.findById(roleId); if (foundRole.isPresent()) { RoleEntity roleEntity = foundRole.get(); if (BooleanUtils.isFalse(role...
DefaultRoleAccessor implements RoleAccessor { @Override public void updateRoleName(Long roleId, String roleName) throws AlertDatabaseConstraintException { Optional<RoleEntity> foundRole = roleRepository.findById(roleId); if (foundRole.isPresent()) { RoleEntity roleEntity = foundRole.get(); if (BooleanUtils.isFalse(role...
@Test public void updateRoleNameCustomFalseTest() throws Exception { DefaultRoleAccessor authorizationUtility = new DefaultRoleAccessor(roleRepository, userRoleRepository, permissionMatrixRepository, registeredDescriptorRepository, configContextRepository); RoleEntity roleEntity = new RoleEntity(DefaultUserRole.ALERT_U...
@Override public void updateRoleName(Long roleId, String roleName) throws AlertDatabaseConstraintException { Optional<RoleEntity> foundRole = roleRepository.findById(roleId); if (foundRole.isPresent()) { RoleEntity roleEntity = foundRole.get(); if (BooleanUtils.isFalse(roleEntity.getCustom())) { throw new AlertDatabase...
DefaultRoleAccessor implements RoleAccessor { @Override public void updateRoleName(Long roleId, String roleName) throws AlertDatabaseConstraintException { Optional<RoleEntity> foundRole = roleRepository.findById(roleId); if (foundRole.isPresent()) { RoleEntity roleEntity = foundRole.get(); if (BooleanUtils.isFalse(role...
DefaultRoleAccessor implements RoleAccessor { @Override public void updateRoleName(Long roleId, String roleName) throws AlertDatabaseConstraintException { Optional<RoleEntity> foundRole = roleRepository.findById(roleId); if (foundRole.isPresent()) { RoleEntity roleEntity = foundRole.get(); if (BooleanUtils.isFalse(role...
DefaultRoleAccessor implements RoleAccessor { @Override public void updateRoleName(Long roleId, String roleName) throws AlertDatabaseConstraintException { Optional<RoleEntity> foundRole = roleRepository.findById(roleId); if (foundRole.isPresent()) { RoleEntity roleEntity = foundRole.get(); if (BooleanUtils.isFalse(role...
DefaultRoleAccessor implements RoleAccessor { @Override public void updateRoleName(Long roleId, String roleName) throws AlertDatabaseConstraintException { Optional<RoleEntity> foundRole = roleRepository.findById(roleId); if (foundRole.isPresent()) { RoleEntity roleEntity = foundRole.get(); if (BooleanUtils.isFalse(role...
@Test public void updatePermissionsForRole() throws Exception { final String roleName = "roleName"; final String contextString = "context-test"; final String descriptorName = "descriptorName"; RoleEntity roleEntity = new RoleEntity(roleName, true); roleEntity.setId(1L); ConfigContextEntity configContextEntity = new Con...
@Override public PermissionMatrixModel updatePermissionsForRole(String roleName, PermissionMatrixModel permissionMatrix) throws AlertDatabaseConstraintException { RoleEntity roleEntity = roleRepository.findByRoleName(roleName) .orElseThrow(() -> new AlertDatabaseConstraintException("No role exists with name: " + roleNa...
DefaultRoleAccessor implements RoleAccessor { @Override public PermissionMatrixModel updatePermissionsForRole(String roleName, PermissionMatrixModel permissionMatrix) throws AlertDatabaseConstraintException { RoleEntity roleEntity = roleRepository.findByRoleName(roleName) .orElseThrow(() -> new AlertDatabaseConstraintE...
DefaultRoleAccessor implements RoleAccessor { @Override public PermissionMatrixModel updatePermissionsForRole(String roleName, PermissionMatrixModel permissionMatrix) throws AlertDatabaseConstraintException { RoleEntity roleEntity = roleRepository.findByRoleName(roleName) .orElseThrow(() -> new AlertDatabaseConstraintE...
DefaultRoleAccessor implements RoleAccessor { @Override public PermissionMatrixModel updatePermissionsForRole(String roleName, PermissionMatrixModel permissionMatrix) throws AlertDatabaseConstraintException { RoleEntity roleEntity = roleRepository.findByRoleName(roleName) .orElseThrow(() -> new AlertDatabaseConstraintE...
DefaultRoleAccessor implements RoleAccessor { @Override public PermissionMatrixModel updatePermissionsForRole(String roleName, PermissionMatrixModel permissionMatrix) throws AlertDatabaseConstraintException { RoleEntity roleEntity = roleRepository.findByRoleName(roleName) .orElseThrow(() -> new AlertDatabaseConstraintE...
@Test public void getUsersByProviderConfigNameTest() throws Exception { ConfigurationModel configurationModel = createConfigurationModel(); ProviderUserEntity providerUserEntity = new ProviderUserEntity(projectOwnerEmail, true, 1L); ProviderProjectRepository providerProjectRepository = Mockito.mock(ProviderProjectRepos...
@Override public List<ProviderUserModel> getUsersByProviderConfigName(String providerConfigName) { if (StringUtils.isBlank(providerConfigName)) { return List.of(); } try { Optional<Long> optionalProviderConfigId = configurationAccessor.getProviderConfigurationByName(providerConfigName) .map(ConfigurationModel::getConfi...
DefaultProviderDataAccessor implements ProviderDataAccessor { @Override public List<ProviderUserModel> getUsersByProviderConfigName(String providerConfigName) { if (StringUtils.isBlank(providerConfigName)) { return List.of(); } try { Optional<Long> optionalProviderConfigId = configurationAccessor.getProviderConfigurati...
DefaultProviderDataAccessor implements ProviderDataAccessor { @Override public List<ProviderUserModel> getUsersByProviderConfigName(String providerConfigName) { if (StringUtils.isBlank(providerConfigName)) { return List.of(); } try { Optional<Long> optionalProviderConfigId = configurationAccessor.getProviderConfigurati...
DefaultProviderDataAccessor implements ProviderDataAccessor { @Override public List<ProviderUserModel> getUsersByProviderConfigName(String providerConfigName) { if (StringUtils.isBlank(providerConfigName)) { return List.of(); } try { Optional<Long> optionalProviderConfigId = configurationAccessor.getProviderConfigurati...
DefaultProviderDataAccessor implements ProviderDataAccessor { @Override public List<ProviderUserModel> getUsersByProviderConfigName(String providerConfigName) { if (StringUtils.isBlank(providerConfigName)) { return List.of(); } try { Optional<Long> optionalProviderConfigId = configurationAccessor.getProviderConfigurati...
@Test public void deleteRoleTest() throws Exception { final String roleName = "roleName"; final Long roleId = 1L; RoleEntity roleEntity = new RoleEntity(roleName, true); roleEntity.setId(1L); Mockito.when(roleRepository.findById(Mockito.any())).thenReturn(Optional.of(roleEntity)); DefaultRoleAccessor authorizationUtili...
@Override public void deleteRole(Long roleId) throws AlertForbiddenOperationException { Optional<RoleEntity> foundRole = roleRepository.findById(roleId); if (foundRole.isPresent()) { RoleEntity roleEntity = foundRole.get(); if (BooleanUtils.isFalse(roleEntity.getCustom())) { throw new AlertForbiddenOperationException("...
DefaultRoleAccessor implements RoleAccessor { @Override public void deleteRole(Long roleId) throws AlertForbiddenOperationException { Optional<RoleEntity> foundRole = roleRepository.findById(roleId); if (foundRole.isPresent()) { RoleEntity roleEntity = foundRole.get(); if (BooleanUtils.isFalse(roleEntity.getCustom())) ...
DefaultRoleAccessor implements RoleAccessor { @Override public void deleteRole(Long roleId) throws AlertForbiddenOperationException { Optional<RoleEntity> foundRole = roleRepository.findById(roleId); if (foundRole.isPresent()) { RoleEntity roleEntity = foundRole.get(); if (BooleanUtils.isFalse(roleEntity.getCustom())) ...
DefaultRoleAccessor implements RoleAccessor { @Override public void deleteRole(Long roleId) throws AlertForbiddenOperationException { Optional<RoleEntity> foundRole = roleRepository.findById(roleId); if (foundRole.isPresent()) { RoleEntity roleEntity = foundRole.get(); if (BooleanUtils.isFalse(roleEntity.getCustom())) ...
DefaultRoleAccessor implements RoleAccessor { @Override public void deleteRole(Long roleId) throws AlertForbiddenOperationException { Optional<RoleEntity> foundRole = roleRepository.findById(roleId); if (foundRole.isPresent()) { RoleEntity roleEntity = foundRole.get(); if (BooleanUtils.isFalse(roleEntity.getCustom())) ...
@Test public void deleteRoleCustomFalseTest() throws Exception { DefaultRoleAccessor authorizationUtility = new DefaultRoleAccessor(roleRepository, userRoleRepository, permissionMatrixRepository, registeredDescriptorRepository, configContextRepository); RoleEntity roleEntity = new RoleEntity("name", false); roleEntity....
@Override public void deleteRole(Long roleId) throws AlertForbiddenOperationException { Optional<RoleEntity> foundRole = roleRepository.findById(roleId); if (foundRole.isPresent()) { RoleEntity roleEntity = foundRole.get(); if (BooleanUtils.isFalse(roleEntity.getCustom())) { throw new AlertForbiddenOperationException("...
DefaultRoleAccessor implements RoleAccessor { @Override public void deleteRole(Long roleId) throws AlertForbiddenOperationException { Optional<RoleEntity> foundRole = roleRepository.findById(roleId); if (foundRole.isPresent()) { RoleEntity roleEntity = foundRole.get(); if (BooleanUtils.isFalse(roleEntity.getCustom())) ...
DefaultRoleAccessor implements RoleAccessor { @Override public void deleteRole(Long roleId) throws AlertForbiddenOperationException { Optional<RoleEntity> foundRole = roleRepository.findById(roleId); if (foundRole.isPresent()) { RoleEntity roleEntity = foundRole.get(); if (BooleanUtils.isFalse(roleEntity.getCustom())) ...
DefaultRoleAccessor implements RoleAccessor { @Override public void deleteRole(Long roleId) throws AlertForbiddenOperationException { Optional<RoleEntity> foundRole = roleRepository.findById(roleId); if (foundRole.isPresent()) { RoleEntity roleEntity = foundRole.get(); if (BooleanUtils.isFalse(roleEntity.getCustom())) ...
DefaultRoleAccessor implements RoleAccessor { @Override public void deleteRole(Long roleId) throws AlertForbiddenOperationException { Optional<RoleEntity> foundRole = roleRepository.findById(roleId); if (foundRole.isPresent()) { RoleEntity roleEntity = foundRole.get(); if (BooleanUtils.isFalse(roleEntity.getCustom())) ...
@Test public void updateUserRolesTest() { final Long userId = 1L; final String roleName = "roleName"; final Long roleId = 1L; RoleEntity roleEntity = new RoleEntity(roleName, true); roleEntity.setId(1L); UserRoleModel userRoleModel = createUserRoleModel(roleId, roleName, true); Collection<UserRoleModel> userRoleModelCo...
@Override public void updateUserRoles(Long userId, Collection<UserRoleModel> roles) { if (null != userId) { userRoleRepository.deleteAllByUserId(userId); if (null != roles && !roles.isEmpty()) { Collection<String> roleNames = roles.stream().map(UserRoleModel::getName).collect(Collectors.toSet()); List<RoleEntity> roleE...
DefaultRoleAccessor implements RoleAccessor { @Override public void updateUserRoles(Long userId, Collection<UserRoleModel> roles) { if (null != userId) { userRoleRepository.deleteAllByUserId(userId); if (null != roles && !roles.isEmpty()) { Collection<String> roleNames = roles.stream().map(UserRoleModel::getName).colle...
DefaultRoleAccessor implements RoleAccessor { @Override public void updateUserRoles(Long userId, Collection<UserRoleModel> roles) { if (null != userId) { userRoleRepository.deleteAllByUserId(userId); if (null != roles && !roles.isEmpty()) { Collection<String> roleNames = roles.stream().map(UserRoleModel::getName).colle...
DefaultRoleAccessor implements RoleAccessor { @Override public void updateUserRoles(Long userId, Collection<UserRoleModel> roles) { if (null != userId) { userRoleRepository.deleteAllByUserId(userId); if (null != roles && !roles.isEmpty()) { Collection<String> roleNames = roles.stream().map(UserRoleModel::getName).colle...
DefaultRoleAccessor implements RoleAccessor { @Override public void updateUserRoles(Long userId, Collection<UserRoleModel> roles) { if (null != userId) { userRoleRepository.deleteAllByUserId(userId); if (null != roles && !roles.isEmpty()) { Collection<String> roleNames = roles.stream().map(UserRoleModel::getName).colle...
@Test public void testSuperSetRoles() { RoleRepository roleRepository = Mockito.mock(RoleRepository.class); UserRoleRepository userRoleRepository = Mockito.mock(UserRoleRepository.class); PermissionMatrixRepository permissionMatrixRepository = Mockito.mock(PermissionMatrixRepository.class); RegisteredDescriptorReposito...
@Override public PermissionMatrixModel mergePermissionsForRoles(Collection<String> roleNames) { List<RoleEntity> roles = roleRepository.findRoleEntitiesByRoleNames(roleNames); return readPermissionsForRole(roles); }
DefaultRoleAccessor implements RoleAccessor { @Override public PermissionMatrixModel mergePermissionsForRoles(Collection<String> roleNames) { List<RoleEntity> roles = roleRepository.findRoleEntitiesByRoleNames(roleNames); return readPermissionsForRole(roles); } }
DefaultRoleAccessor implements RoleAccessor { @Override public PermissionMatrixModel mergePermissionsForRoles(Collection<String> roleNames) { List<RoleEntity> roles = roleRepository.findRoleEntitiesByRoleNames(roleNames); return readPermissionsForRole(roles); } @Autowired DefaultRoleAccessor(RoleRepository roleReposit...
DefaultRoleAccessor implements RoleAccessor { @Override public PermissionMatrixModel mergePermissionsForRoles(Collection<String> roleNames) { List<RoleEntity> roles = roleRepository.findRoleEntitiesByRoleNames(roleNames); return readPermissionsForRole(roles); } @Autowired DefaultRoleAccessor(RoleRepository roleReposit...
DefaultRoleAccessor implements RoleAccessor { @Override public PermissionMatrixModel mergePermissionsForRoles(Collection<String> roleNames) { List<RoleEntity> roles = roleRepository.findRoleEntitiesByRoleNames(roleNames); return readPermissionsForRole(roles); } @Autowired DefaultRoleAccessor(RoleRepository roleReposit...
@Test public void getAuthenticationTypeDetailsTest() { AuthenticationTypeRepository authenticationTypeRepository = Mockito.mock(AuthenticationTypeRepository.class); DefaultAuthenticationTypeAccessor authenticationTypeAccessor = new DefaultAuthenticationTypeAccessor(authenticationTypeRepository); AuthenticationTypeEntit...
@Override public Optional<AuthenticationTypeDetails> getAuthenticationTypeDetails(AuthenticationType authenticationType) { Optional<AuthenticationTypeEntity> authenticationTypeEntity = authenticationTypeRepository.findById(authenticationType.getId()); return authenticationTypeEntity.map(entity -> new AuthenticationType...
DefaultAuthenticationTypeAccessor implements AuthenticationTypeAccessor { @Override public Optional<AuthenticationTypeDetails> getAuthenticationTypeDetails(AuthenticationType authenticationType) { Optional<AuthenticationTypeEntity> authenticationTypeEntity = authenticationTypeRepository.findById(authenticationType.getI...
DefaultAuthenticationTypeAccessor implements AuthenticationTypeAccessor { @Override public Optional<AuthenticationTypeDetails> getAuthenticationTypeDetails(AuthenticationType authenticationType) { Optional<AuthenticationTypeEntity> authenticationTypeEntity = authenticationTypeRepository.findById(authenticationType.getI...
DefaultAuthenticationTypeAccessor implements AuthenticationTypeAccessor { @Override public Optional<AuthenticationTypeDetails> getAuthenticationTypeDetails(AuthenticationType authenticationType) { Optional<AuthenticationTypeEntity> authenticationTypeEntity = authenticationTypeRepository.findById(authenticationType.getI...
DefaultAuthenticationTypeAccessor implements AuthenticationTypeAccessor { @Override public Optional<AuthenticationTypeDetails> getAuthenticationTypeDetails(AuthenticationType authenticationType) { Optional<AuthenticationTypeEntity> authenticationTypeEntity = authenticationTypeRepository.findById(authenticationType.getI...
@Test public void getAuthenticationTypeDetailsNullTest() { AuthenticationTypeRepository authenticationTypeRepository = Mockito.mock(AuthenticationTypeRepository.class); DefaultAuthenticationTypeAccessor authenticationTypeAccessor = new DefaultAuthenticationTypeAccessor(authenticationTypeRepository); Mockito.when(authen...
@Override public Optional<AuthenticationTypeDetails> getAuthenticationTypeDetails(AuthenticationType authenticationType) { Optional<AuthenticationTypeEntity> authenticationTypeEntity = authenticationTypeRepository.findById(authenticationType.getId()); return authenticationTypeEntity.map(entity -> new AuthenticationType...
DefaultAuthenticationTypeAccessor implements AuthenticationTypeAccessor { @Override public Optional<AuthenticationTypeDetails> getAuthenticationTypeDetails(AuthenticationType authenticationType) { Optional<AuthenticationTypeEntity> authenticationTypeEntity = authenticationTypeRepository.findById(authenticationType.getI...
DefaultAuthenticationTypeAccessor implements AuthenticationTypeAccessor { @Override public Optional<AuthenticationTypeDetails> getAuthenticationTypeDetails(AuthenticationType authenticationType) { Optional<AuthenticationTypeEntity> authenticationTypeEntity = authenticationTypeRepository.findById(authenticationType.getI...
DefaultAuthenticationTypeAccessor implements AuthenticationTypeAccessor { @Override public Optional<AuthenticationTypeDetails> getAuthenticationTypeDetails(AuthenticationType authenticationType) { Optional<AuthenticationTypeEntity> authenticationTypeEntity = authenticationTypeRepository.findById(authenticationType.getI...
DefaultAuthenticationTypeAccessor implements AuthenticationTypeAccessor { @Override public Optional<AuthenticationTypeDetails> getAuthenticationTypeDetails(AuthenticationType authenticationType) { Optional<AuthenticationTypeEntity> authenticationTypeEntity = authenticationTypeRepository.findById(authenticationType.getI...
@Test public void getAuthenticationTypeTest() { AuthenticationTypeRepository authenticationTypeRepository = Mockito.mock(AuthenticationTypeRepository.class); DefaultAuthenticationTypeAccessor authenticationTypeAccessor = new DefaultAuthenticationTypeAccessor(authenticationTypeRepository); assertEquals(AuthenticationTyp...
@Override public Optional<AuthenticationType> getAuthenticationType(Long id) { return AuthenticationType.getById(id); }
DefaultAuthenticationTypeAccessor implements AuthenticationTypeAccessor { @Override public Optional<AuthenticationType> getAuthenticationType(Long id) { return AuthenticationType.getById(id); } }
DefaultAuthenticationTypeAccessor implements AuthenticationTypeAccessor { @Override public Optional<AuthenticationType> getAuthenticationType(Long id) { return AuthenticationType.getById(id); } @Autowired DefaultAuthenticationTypeAccessor(AuthenticationTypeRepository authenticationTypeRepository); }
DefaultAuthenticationTypeAccessor implements AuthenticationTypeAccessor { @Override public Optional<AuthenticationType> getAuthenticationType(Long id) { return AuthenticationType.getById(id); } @Autowired DefaultAuthenticationTypeAccessor(AuthenticationTypeRepository authenticationTypeRepository); @Override Optional<A...
DefaultAuthenticationTypeAccessor implements AuthenticationTypeAccessor { @Override public Optional<AuthenticationType> getAuthenticationType(Long id) { return AuthenticationType.getById(id); } @Autowired DefaultAuthenticationTypeAccessor(AuthenticationTypeRepository authenticationTypeRepository); @Override Optional<A...
@Test public void getTaskPropertyTest() { DefaultProviderTaskPropertiesAccessor providerTaskPropertiesAccessor = new DefaultProviderTaskPropertiesAccessor(providerTaskPropertiesRepository); Optional<String> taskPropertyValue = providerTaskPropertiesAccessor.getTaskProperty(taskName, propertyName); assertTrue(taskProper...
@Override public Optional<String> getTaskProperty(String taskName, String propertyKey) { if (StringUtils.isBlank(taskName) || StringUtils.isBlank(propertyKey)) { return Optional.empty(); } return providerTaskPropertiesRepository.findByTaskNameAndPropertyName(taskName, propertyKey).map(ProviderTaskPropertiesEntity::getV...
DefaultProviderTaskPropertiesAccessor implements ProviderTaskPropertiesAccessor { @Override public Optional<String> getTaskProperty(String taskName, String propertyKey) { if (StringUtils.isBlank(taskName) || StringUtils.isBlank(propertyKey)) { return Optional.empty(); } return providerTaskPropertiesRepository.findByTas...
DefaultProviderTaskPropertiesAccessor implements ProviderTaskPropertiesAccessor { @Override public Optional<String> getTaskProperty(String taskName, String propertyKey) { if (StringUtils.isBlank(taskName) || StringUtils.isBlank(propertyKey)) { return Optional.empty(); } return providerTaskPropertiesRepository.findByTas...
DefaultProviderTaskPropertiesAccessor implements ProviderTaskPropertiesAccessor { @Override public Optional<String> getTaskProperty(String taskName, String propertyKey) { if (StringUtils.isBlank(taskName) || StringUtils.isBlank(propertyKey)) { return Optional.empty(); } return providerTaskPropertiesRepository.findByTas...
DefaultProviderTaskPropertiesAccessor implements ProviderTaskPropertiesAccessor { @Override public Optional<String> getTaskProperty(String taskName, String propertyKey) { if (StringUtils.isBlank(taskName) || StringUtils.isBlank(propertyKey)) { return Optional.empty(); } return providerTaskPropertiesRepository.findByTas...
@Test public void getTaskPropertyEmptyTest() { DefaultProviderTaskPropertiesAccessor providerTaskPropertiesAccessor = new DefaultProviderTaskPropertiesAccessor(providerTaskPropertiesRepository); Optional<String> taskPropertyOptionalEmpty = providerTaskPropertiesAccessor.getTaskProperty("invalidTaskName", "invalidProper...
@Override public Optional<String> getTaskProperty(String taskName, String propertyKey) { if (StringUtils.isBlank(taskName) || StringUtils.isBlank(propertyKey)) { return Optional.empty(); } return providerTaskPropertiesRepository.findByTaskNameAndPropertyName(taskName, propertyKey).map(ProviderTaskPropertiesEntity::getV...
DefaultProviderTaskPropertiesAccessor implements ProviderTaskPropertiesAccessor { @Override public Optional<String> getTaskProperty(String taskName, String propertyKey) { if (StringUtils.isBlank(taskName) || StringUtils.isBlank(propertyKey)) { return Optional.empty(); } return providerTaskPropertiesRepository.findByTas...
DefaultProviderTaskPropertiesAccessor implements ProviderTaskPropertiesAccessor { @Override public Optional<String> getTaskProperty(String taskName, String propertyKey) { if (StringUtils.isBlank(taskName) || StringUtils.isBlank(propertyKey)) { return Optional.empty(); } return providerTaskPropertiesRepository.findByTas...
DefaultProviderTaskPropertiesAccessor implements ProviderTaskPropertiesAccessor { @Override public Optional<String> getTaskProperty(String taskName, String propertyKey) { if (StringUtils.isBlank(taskName) || StringUtils.isBlank(propertyKey)) { return Optional.empty(); } return providerTaskPropertiesRepository.findByTas...
DefaultProviderTaskPropertiesAccessor implements ProviderTaskPropertiesAccessor { @Override public Optional<String> getTaskProperty(String taskName, String propertyKey) { if (StringUtils.isBlank(taskName) || StringUtils.isBlank(propertyKey)) { return Optional.empty(); } return providerTaskPropertiesRepository.findByTas...
@Test public void setTaskPropertyTest() throws Exception { final Long newConfigId = 2L; final String newTaskName = "taskName-new"; final String newPropertyName = "propertyName-new"; final String newValue = "value-new"; DefaultProviderTaskPropertiesAccessor providerTaskPropertiesAccessor = new DefaultProviderTaskPropert...
@Override public void setTaskProperty(Long configId, String taskName, String propertyKey, String propertyValue) throws AlertDatabaseConstraintException { if (null == configId || StringUtils.isBlank(taskName) || StringUtils.isBlank(propertyKey) || StringUtils.isBlank(propertyValue)) { throw new AlertDatabaseConstraintEx...
DefaultProviderTaskPropertiesAccessor implements ProviderTaskPropertiesAccessor { @Override public void setTaskProperty(Long configId, String taskName, String propertyKey, String propertyValue) throws AlertDatabaseConstraintException { if (null == configId || StringUtils.isBlank(taskName) || StringUtils.isBlank(propert...
DefaultProviderTaskPropertiesAccessor implements ProviderTaskPropertiesAccessor { @Override public void setTaskProperty(Long configId, String taskName, String propertyKey, String propertyValue) throws AlertDatabaseConstraintException { if (null == configId || StringUtils.isBlank(taskName) || StringUtils.isBlank(propert...
DefaultProviderTaskPropertiesAccessor implements ProviderTaskPropertiesAccessor { @Override public void setTaskProperty(Long configId, String taskName, String propertyKey, String propertyValue) throws AlertDatabaseConstraintException { if (null == configId || StringUtils.isBlank(taskName) || StringUtils.isBlank(propert...
DefaultProviderTaskPropertiesAccessor implements ProviderTaskPropertiesAccessor { @Override public void setTaskProperty(Long configId, String taskName, String propertyKey, String propertyValue) throws AlertDatabaseConstraintException { if (null == configId || StringUtils.isBlank(taskName) || StringUtils.isBlank(propert...
@Test public void getUsersByProviderConfigNameBlankTest() { DefaultProviderDataAccessor providerDataAccessor = new DefaultProviderDataAccessor(null, null, null, null); List<ProviderUserModel> providerUserModelList = providerDataAccessor.getUsersByProviderConfigName(""); assertTrue(providerUserModelList.isEmpty()); }
@Override public List<ProviderUserModel> getUsersByProviderConfigName(String providerConfigName) { if (StringUtils.isBlank(providerConfigName)) { return List.of(); } try { Optional<Long> optionalProviderConfigId = configurationAccessor.getProviderConfigurationByName(providerConfigName) .map(ConfigurationModel::getConfi...
DefaultProviderDataAccessor implements ProviderDataAccessor { @Override public List<ProviderUserModel> getUsersByProviderConfigName(String providerConfigName) { if (StringUtils.isBlank(providerConfigName)) { return List.of(); } try { Optional<Long> optionalProviderConfigId = configurationAccessor.getProviderConfigurati...
DefaultProviderDataAccessor implements ProviderDataAccessor { @Override public List<ProviderUserModel> getUsersByProviderConfigName(String providerConfigName) { if (StringUtils.isBlank(providerConfigName)) { return List.of(); } try { Optional<Long> optionalProviderConfigId = configurationAccessor.getProviderConfigurati...
DefaultProviderDataAccessor implements ProviderDataAccessor { @Override public List<ProviderUserModel> getUsersByProviderConfigName(String providerConfigName) { if (StringUtils.isBlank(providerConfigName)) { return List.of(); } try { Optional<Long> optionalProviderConfigId = configurationAccessor.getProviderConfigurati...
DefaultProviderDataAccessor implements ProviderDataAccessor { @Override public List<ProviderUserModel> getUsersByProviderConfigName(String providerConfigName) { if (StringUtils.isBlank(providerConfigName)) { return List.of(); } try { Optional<Long> optionalProviderConfigId = configurationAccessor.getProviderConfigurati...
@Test public void testTimesCited() throws Exception { boolean status = false; String path = getClass().getResource("incites_times_cited.xlsx").getFile(); path = URLDecoder.decode(path,"UTF-8"); SocialNetwork socialNetwork = new SocialNetwork("test",Category.INCITES); SocialNetworkAppManager appManager = new SocialNetwo...
@Override public void run(TaskMonitor taskMonitor) throws Exception { taskMonitor.setTitle("Loading InCites Network ..."); this.locationMap = new IncitesInstitutionLocationMap(); OPCPackage pkg; try { MonitoredFileInputStream fileInputStream = new MonitoredFileInputStream(file, taskMonitor, "Parsing InCites XLSX ...");...
IncitesParser extends AbstractTask { @Override public void run(TaskMonitor taskMonitor) throws Exception { taskMonitor.setTitle("Loading InCites Network ..."); this.locationMap = new IncitesInstitutionLocationMap(); OPCPackage pkg; try { MonitoredFileInputStream fileInputStream = new MonitoredFileInputStream(file, task...
IncitesParser extends AbstractTask { @Override public void run(TaskMonitor taskMonitor) throws Exception { taskMonitor.setTitle("Loading InCites Network ..."); this.locationMap = new IncitesInstitutionLocationMap(); OPCPackage pkg; try { MonitoredFileInputStream fileInputStream = new MonitoredFileInputStream(file, task...
IncitesParser extends AbstractTask { @Override public void run(TaskMonitor taskMonitor) throws Exception { taskMonitor.setTitle("Loading InCites Network ..."); this.locationMap = new IncitesInstitutionLocationMap(); OPCPackage pkg; try { MonitoredFileInputStream fileInputStream = new MonitoredFileInputStream(file, task...
IncitesParser extends AbstractTask { @Override public void run(TaskMonitor taskMonitor) throws Exception { taskMonitor.setTitle("Loading InCites Network ..."); this.locationMap = new IncitesInstitutionLocationMap(); OPCPackage pkg; try { MonitoredFileInputStream fileInputStream = new MonitoredFileInputStream(file, task...
@Test public void testUpperCaseEquality() { Author author = new Author("somebody h", Category.PUBMED); Author authorUpperCase = new Author("sOMeBODy H", Category.PUBMED); assertTrue(authorUpperCase.equals(author)); }
@Override public boolean equals(Object other) { Author otherAuthor = (Author) other; boolean isEqual = false, isEqualFirstName = false, isEqualLastName = false; if (this.getOrigin() == Category.INCITES && otherAuthor.getOrigin() == Category.INCITES) { boolean isEqualInstitution = false; isEqualLastName = this.getLastNa...
Author extends AbstractNode { @Override public boolean equals(Object other) { Author otherAuthor = (Author) other; boolean isEqual = false, isEqualFirstName = false, isEqualLastName = false; if (this.getOrigin() == Category.INCITES && otherAuthor.getOrigin() == Category.INCITES) { boolean isEqualInstitution = false; is...
Author extends AbstractNode { @Override public boolean equals(Object other) { Author otherAuthor = (Author) other; boolean isEqual = false, isEqualFirstName = false, isEqualLastName = false; if (this.getOrigin() == Category.INCITES && otherAuthor.getOrigin() == Category.INCITES) { boolean isEqualInstitution = false; is...
Author extends AbstractNode { @Override public boolean equals(Object other) { Author otherAuthor = (Author) other; boolean isEqual = false, isEqualFirstName = false, isEqualLastName = false; if (this.getOrigin() == Category.INCITES && otherAuthor.getOrigin() == Category.INCITES) { boolean isEqualInstitution = false; is...
Author extends AbstractNode { @Override public boolean equals(Object other) { Author otherAuthor = (Author) other; boolean isEqual = false, isEqualFirstName = false, isEqualLastName = false; if (this.getOrigin() == Category.INCITES && otherAuthor.getOrigin() == Category.INCITES) { boolean isEqualInstitution = false; is...
@Test public void testUpperCaseHashCode() { Author author = new Author("somebody hm", Category.PUBMED); Author authorUpperCase = new Author("sOMeBODy H", Category.PUBMED); assertTrue(authorUpperCase.hashCode() == author.hashCode()); }
@Override public int hashCode() { final int prime = 31; int result = 1; result += prime * result + ((this.firstInitial == null) ? 0 : this.firstInitial.hashCode()); result += prime * result + ((this.lastName == null) ? 0 : this.lastName.hashCode()); return result; }
Author extends AbstractNode { @Override public int hashCode() { final int prime = 31; int result = 1; result += prime * result + ((this.firstInitial == null) ? 0 : this.firstInitial.hashCode()); result += prime * result + ((this.lastName == null) ? 0 : this.lastName.hashCode()); return result; } }
Author extends AbstractNode { @Override public int hashCode() { final int prime = 31; int result = 1; result += prime * result + ((this.firstInitial == null) ? 0 : this.firstInitial.hashCode()); result += prime * result + ((this.lastName == null) ? 0 : this.lastName.hashCode()); return result; } Author(String rawAuthor...
Author extends AbstractNode { @Override public int hashCode() { final int prime = 31; int result = 1; result += prime * result + ((this.firstInitial == null) ? 0 : this.firstInitial.hashCode()); result += prime * result + ((this.lastName == null) ? 0 : this.lastName.hashCode()); return result; } Author(String rawAuthor...
Author extends AbstractNode { @Override public int hashCode() { final int prime = 31; int result = 1; result += prime * result + ((this.firstInitial == null) ? 0 : this.firstInitial.hashCode()); result += prime * result + ((this.lastName == null) ? 0 : this.lastName.hashCode()); return result; } Author(String rawAuthor...
@Test public void testVerifyFirstNameA() { Author author1 = new Author("Kofia, Victro (UNIV TORONTO)", Category.INCITES); Author author2 = new Author("Kofia, Victor (UNIV TORONTO)", Category.INCITES); Author author3 = null; HashMap<Author, Author> authorMap = new HashMap<Author, Author>(); authorMap.put(author2, author...
public String getFirstName() { return this.firstName; }
Author extends AbstractNode { public String getFirstName() { return this.firstName; } }
Author extends AbstractNode { public String getFirstName() { return this.firstName; } Author(String rawAuthorText, int origin); Author(String rawAuthorText, int origin, IncitesInstitutionLocationMap locationMap); }
Author extends AbstractNode { public String getFirstName() { return this.firstName; } Author(String rawAuthorText, int origin); Author(String rawAuthorText, int origin, IncitesInstitutionLocationMap locationMap); void addInstitution(String institution); void addPublication(Publication publication); double getExpectedC...
Author extends AbstractNode { public String getFirstName() { return this.firstName; } Author(String rawAuthorText, int origin); Author(String rawAuthorText, int origin, IncitesInstitutionLocationMap locationMap); void addInstitution(String institution); void addPublication(Publication publication); double getExpectedC...
@Test public void testVerifyFirstNameB() { Author author1 = new Author("Kofia, V (UNIV TORONTO)", Category.INCITES); Author author2 = new Author("Kofia, Victor (UNIV TORONTO)", Category.INCITES); Author author3 = null; HashMap<Author, Author> authorMap = new HashMap<Author, Author>(); authorMap.put(author2, author2); b...
public String getFirstName() { return this.firstName; }
Author extends AbstractNode { public String getFirstName() { return this.firstName; } }
Author extends AbstractNode { public String getFirstName() { return this.firstName; } Author(String rawAuthorText, int origin); Author(String rawAuthorText, int origin, IncitesInstitutionLocationMap locationMap); }
Author extends AbstractNode { public String getFirstName() { return this.firstName; } Author(String rawAuthorText, int origin); Author(String rawAuthorText, int origin, IncitesInstitutionLocationMap locationMap); void addInstitution(String institution); void addPublication(Publication publication); double getExpectedC...
Author extends AbstractNode { public String getFirstName() { return this.firstName; } Author(String rawAuthorText, int origin); Author(String rawAuthorText, int origin, IncitesInstitutionLocationMap locationMap); void addInstitution(String institution); void addPublication(Publication publication); double getExpectedC...
@Test public void testInstitutionRanking() throws Exception { boolean status = false; String path = getClass().getResource("incites_institution_ranking.xlsx").getFile(); path = URLDecoder.decode(path,"UTF-8"); SocialNetwork socialNetwork = new SocialNetwork("test",Category.INCITES); SocialNetworkAppManager appManager =...
@Override public void run(TaskMonitor taskMonitor) throws Exception { taskMonitor.setTitle("Loading InCites Network ..."); this.locationMap = new IncitesInstitutionLocationMap(); OPCPackage pkg; try { MonitoredFileInputStream fileInputStream = new MonitoredFileInputStream(file, taskMonitor, "Parsing InCites XLSX ...");...
IncitesParser extends AbstractTask { @Override public void run(TaskMonitor taskMonitor) throws Exception { taskMonitor.setTitle("Loading InCites Network ..."); this.locationMap = new IncitesInstitutionLocationMap(); OPCPackage pkg; try { MonitoredFileInputStream fileInputStream = new MonitoredFileInputStream(file, task...
IncitesParser extends AbstractTask { @Override public void run(TaskMonitor taskMonitor) throws Exception { taskMonitor.setTitle("Loading InCites Network ..."); this.locationMap = new IncitesInstitutionLocationMap(); OPCPackage pkg; try { MonitoredFileInputStream fileInputStream = new MonitoredFileInputStream(file, task...
IncitesParser extends AbstractTask { @Override public void run(TaskMonitor taskMonitor) throws Exception { taskMonitor.setTitle("Loading InCites Network ..."); this.locationMap = new IncitesInstitutionLocationMap(); OPCPackage pkg; try { MonitoredFileInputStream fileInputStream = new MonitoredFileInputStream(file, task...
IncitesParser extends AbstractTask { @Override public void run(TaskMonitor taskMonitor) throws Exception { taskMonitor.setTitle("Loading InCites Network ..."); this.locationMap = new IncitesInstitutionLocationMap(); OPCPackage pkg; try { MonitoredFileInputStream fileInputStream = new MonitoredFileInputStream(file, task...
@Test public void testExpectedCitations() throws Exception { boolean status = false; String path = getClass().getResource("expected_citations.xlsx").getFile(); path = URLDecoder.decode(path,"UTF-8"); SocialNetwork socialNetwork = new SocialNetwork("test",Category.INCITES); SocialNetworkAppManager appManager = new Socia...
@Override public void run(TaskMonitor taskMonitor) throws Exception { taskMonitor.setTitle("Loading InCites Network ..."); this.locationMap = new IncitesInstitutionLocationMap(); OPCPackage pkg; try { MonitoredFileInputStream fileInputStream = new MonitoredFileInputStream(file, taskMonitor, "Parsing InCites XLSX ...");...
IncitesParser extends AbstractTask { @Override public void run(TaskMonitor taskMonitor) throws Exception { taskMonitor.setTitle("Loading InCites Network ..."); this.locationMap = new IncitesInstitutionLocationMap(); OPCPackage pkg; try { MonitoredFileInputStream fileInputStream = new MonitoredFileInputStream(file, task...
IncitesParser extends AbstractTask { @Override public void run(TaskMonitor taskMonitor) throws Exception { taskMonitor.setTitle("Loading InCites Network ..."); this.locationMap = new IncitesInstitutionLocationMap(); OPCPackage pkg; try { MonitoredFileInputStream fileInputStream = new MonitoredFileInputStream(file, task...
IncitesParser extends AbstractTask { @Override public void run(TaskMonitor taskMonitor) throws Exception { taskMonitor.setTitle("Loading InCites Network ..."); this.locationMap = new IncitesInstitutionLocationMap(); OPCPackage pkg; try { MonitoredFileInputStream fileInputStream = new MonitoredFileInputStream(file, task...
IncitesParser extends AbstractTask { @Override public void run(TaskMonitor taskMonitor) throws Exception { taskMonitor.setTitle("Loading InCites Network ..."); this.locationMap = new IncitesInstitutionLocationMap(); OPCPackage pkg; try { MonitoredFileInputStream fileInputStream = new MonitoredFileInputStream(file, task...
@Test public void testEquality() { Author author1 = new Author("somebody h", Category.PUBMED); Author author2 = new Author("somebody hm", Category.PUBMED); assertTrue(author1.equals(author2)); }
@Override public boolean equals(Object other) { Author otherAuthor = (Author) other; boolean isEqual = false, isEqualFirstName = false, isEqualLastName = false; if (this.getOrigin() == Category.INCITES && otherAuthor.getOrigin() == Category.INCITES) { boolean isEqualInstitution = false; isEqualLastName = this.getLastNa...
Author extends AbstractNode { @Override public boolean equals(Object other) { Author otherAuthor = (Author) other; boolean isEqual = false, isEqualFirstName = false, isEqualLastName = false; if (this.getOrigin() == Category.INCITES && otherAuthor.getOrigin() == Category.INCITES) { boolean isEqualInstitution = false; is...
Author extends AbstractNode { @Override public boolean equals(Object other) { Author otherAuthor = (Author) other; boolean isEqual = false, isEqualFirstName = false, isEqualLastName = false; if (this.getOrigin() == Category.INCITES && otherAuthor.getOrigin() == Category.INCITES) { boolean isEqualInstitution = false; is...
Author extends AbstractNode { @Override public boolean equals(Object other) { Author otherAuthor = (Author) other; boolean isEqual = false, isEqualFirstName = false, isEqualLastName = false; if (this.getOrigin() == Category.INCITES && otherAuthor.getOrigin() == Category.INCITES) { boolean isEqualInstitution = false; is...
Author extends AbstractNode { @Override public boolean equals(Object other) { Author otherAuthor = (Author) other; boolean isEqual = false, isEqualFirstName = false, isEqualLastName = false; if (this.getOrigin() == Category.INCITES && otherAuthor.getOrigin() == Category.INCITES) { boolean isEqualInstitution = false; is...
@Test public void testFixDefectiveFirstName() { Author author1 = new Author("Kofia, Victor (UNIV TORONTO)", Category.INCITES); Author author2 = new Author("Kofia, Vica (UNIV TORONTO)", Category.INCITES); Author check = null; HashMap<Author, Author> authorMap = new HashMap<Author, Author>(); authorMap.put(author2, autho...
public String getFirstName() { return this.firstName; }
Author extends AbstractNode { public String getFirstName() { return this.firstName; } }
Author extends AbstractNode { public String getFirstName() { return this.firstName; } Author(String rawAuthorText, int origin); Author(String rawAuthorText, int origin, IncitesInstitutionLocationMap locationMap); }
Author extends AbstractNode { public String getFirstName() { return this.firstName; } Author(String rawAuthorText, int origin); Author(String rawAuthorText, int origin, IncitesInstitutionLocationMap locationMap); void addInstitution(String institution); void addPublication(Publication publication); double getExpectedC...
Author extends AbstractNode { public String getFirstName() { return this.firstName; } Author(String rawAuthorText, int origin); Author(String rawAuthorText, int origin, IncitesInstitutionLocationMap locationMap); void addInstitution(String institution); void addPublication(Publication publication); double getExpectedC...
@Test public void testFixFirstName() { Author author1 = new Author("Kofia, Victor (UNIV TORONTO)", Category.INCITES); Author author2 = new Author("Kofia, V (UNIV TORONTO)", Category.INCITES); Object check = null; HashMap<Author, Author> authorMap = new HashMap<Author, Author>(); authorMap.put(author2, author2); boolean...
public String getFirstName() { return this.firstName; }
Author extends AbstractNode { public String getFirstName() { return this.firstName; } }
Author extends AbstractNode { public String getFirstName() { return this.firstName; } Author(String rawAuthorText, int origin); Author(String rawAuthorText, int origin, IncitesInstitutionLocationMap locationMap); }
Author extends AbstractNode { public String getFirstName() { return this.firstName; } Author(String rawAuthorText, int origin); Author(String rawAuthorText, int origin, IncitesInstitutionLocationMap locationMap); void addInstitution(String institution); void addPublication(Publication publication); double getExpectedC...
Author extends AbstractNode { public String getFirstName() { return this.firstName; } Author(String rawAuthorText, int origin); Author(String rawAuthorText, int origin, IncitesInstitutionLocationMap locationMap); void addInstitution(String institution); void addPublication(Publication publication); double getExpectedC...
@Test public void testHashCode() { Author author1 = new Author("somebody h", Category.PUBMED); Author author2 = new Author("somebody hm", Category.PUBMED); assertTrue(author1.hashCode() == author2.hashCode()); }
@Override public int hashCode() { final int prime = 31; int result = 1; result += prime * result + ((this.firstInitial == null) ? 0 : this.firstInitial.hashCode()); result += prime * result + ((this.lastName == null) ? 0 : this.lastName.hashCode()); return result; }
Author extends AbstractNode { @Override public int hashCode() { final int prime = 31; int result = 1; result += prime * result + ((this.firstInitial == null) ? 0 : this.firstInitial.hashCode()); result += prime * result + ((this.lastName == null) ? 0 : this.lastName.hashCode()); return result; } }
Author extends AbstractNode { @Override public int hashCode() { final int prime = 31; int result = 1; result += prime * result + ((this.firstInitial == null) ? 0 : this.firstInitial.hashCode()); result += prime * result + ((this.lastName == null) ? 0 : this.lastName.hashCode()); return result; } Author(String rawAuthor...
Author extends AbstractNode { @Override public int hashCode() { final int prime = 31; int result = 1; result += prime * result + ((this.firstInitial == null) ? 0 : this.firstInitial.hashCode()); result += prime * result + ((this.lastName == null) ? 0 : this.lastName.hashCode()); return result; } Author(String rawAuthor...
Author extends AbstractNode { @Override public int hashCode() { final int prime = 31; int result = 1; result += prime * result + ((this.firstInitial == null) ? 0 : this.firstInitial.hashCode()); result += prime * result + ((this.lastName == null) ? 0 : this.lastName.hashCode()); return result; } Author(String rawAuthor...
@Test public void testIdentifyAuthorWithDefectiveFirstName() { Author author1 = new Author("Kofia, Victor (UNIV TORONTO)", Category.INCITES); Author author2 = new Author("Kofia, Victro (UNIV TORONTO)", Category.INCITES); Author author3 = null; HashMap<Author, Author> authorMap = new HashMap<Author, Author>(); authorMap...
@Override public boolean equals(Object other) { Author otherAuthor = (Author) other; boolean isEqual = false, isEqualFirstName = false, isEqualLastName = false; if (this.getOrigin() == Category.INCITES && otherAuthor.getOrigin() == Category.INCITES) { boolean isEqualInstitution = false; isEqualLastName = this.getLastNa...
Author extends AbstractNode { @Override public boolean equals(Object other) { Author otherAuthor = (Author) other; boolean isEqual = false, isEqualFirstName = false, isEqualLastName = false; if (this.getOrigin() == Category.INCITES && otherAuthor.getOrigin() == Category.INCITES) { boolean isEqualInstitution = false; is...
Author extends AbstractNode { @Override public boolean equals(Object other) { Author otherAuthor = (Author) other; boolean isEqual = false, isEqualFirstName = false, isEqualLastName = false; if (this.getOrigin() == Category.INCITES && otherAuthor.getOrigin() == Category.INCITES) { boolean isEqualInstitution = false; is...
Author extends AbstractNode { @Override public boolean equals(Object other) { Author otherAuthor = (Author) other; boolean isEqual = false, isEqualFirstName = false, isEqualLastName = false; if (this.getOrigin() == Category.INCITES && otherAuthor.getOrigin() == Category.INCITES) { boolean isEqualInstitution = false; is...
Author extends AbstractNode { @Override public boolean equals(Object other) { Author otherAuthor = (Author) other; boolean isEqual = false, isEqualFirstName = false, isEqualLastName = false; if (this.getOrigin() == Category.INCITES && otherAuthor.getOrigin() == Category.INCITES) { boolean isEqualInstitution = false; is...
@Test public void testIdentifyAuthorWithOnlyFirstInitialA() { Author author1 = new Author("Kofia, Victor (UNIV TORONTO)", Category.INCITES); Author author2 = new Author("Kofia, V (UNIV TORONTO)", Category.INCITES); Author author3 = null; HashMap<Author, Author> authorMap = new HashMap<Author, Author>(); authorMap.put(a...
@Override public boolean equals(Object other) { Author otherAuthor = (Author) other; boolean isEqual = false, isEqualFirstName = false, isEqualLastName = false; if (this.getOrigin() == Category.INCITES && otherAuthor.getOrigin() == Category.INCITES) { boolean isEqualInstitution = false; isEqualLastName = this.getLastNa...
Author extends AbstractNode { @Override public boolean equals(Object other) { Author otherAuthor = (Author) other; boolean isEqual = false, isEqualFirstName = false, isEqualLastName = false; if (this.getOrigin() == Category.INCITES && otherAuthor.getOrigin() == Category.INCITES) { boolean isEqualInstitution = false; is...
Author extends AbstractNode { @Override public boolean equals(Object other) { Author otherAuthor = (Author) other; boolean isEqual = false, isEqualFirstName = false, isEqualLastName = false; if (this.getOrigin() == Category.INCITES && otherAuthor.getOrigin() == Category.INCITES) { boolean isEqualInstitution = false; is...
Author extends AbstractNode { @Override public boolean equals(Object other) { Author otherAuthor = (Author) other; boolean isEqual = false, isEqualFirstName = false, isEqualLastName = false; if (this.getOrigin() == Category.INCITES && otherAuthor.getOrigin() == Category.INCITES) { boolean isEqualInstitution = false; is...
Author extends AbstractNode { @Override public boolean equals(Object other) { Author otherAuthor = (Author) other; boolean isEqual = false, isEqualFirstName = false, isEqualLastName = false; if (this.getOrigin() == Category.INCITES && otherAuthor.getOrigin() == Category.INCITES) { boolean isEqualInstitution = false; is...
@Test public void testIdentifyAuthorWithOnlyFirstInitialB() { Author author1 = new Author("Kofia, V (UNIV TORONTO)", Category.INCITES); Author author2 = new Author("Kofia, Victor (UNIV TORONTO)", Category.INCITES); Author author3 = null; HashMap<Author, Author> authorMap = new HashMap<Author, Author>(); authorMap.put(a...
@Override public boolean equals(Object other) { Author otherAuthor = (Author) other; boolean isEqual = false, isEqualFirstName = false, isEqualLastName = false; if (this.getOrigin() == Category.INCITES && otherAuthor.getOrigin() == Category.INCITES) { boolean isEqualInstitution = false; isEqualLastName = this.getLastNa...
Author extends AbstractNode { @Override public boolean equals(Object other) { Author otherAuthor = (Author) other; boolean isEqual = false, isEqualFirstName = false, isEqualLastName = false; if (this.getOrigin() == Category.INCITES && otherAuthor.getOrigin() == Category.INCITES) { boolean isEqualInstitution = false; is...
Author extends AbstractNode { @Override public boolean equals(Object other) { Author otherAuthor = (Author) other; boolean isEqual = false, isEqualFirstName = false, isEqualLastName = false; if (this.getOrigin() == Category.INCITES && otherAuthor.getOrigin() == Category.INCITES) { boolean isEqualInstitution = false; is...
Author extends AbstractNode { @Override public boolean equals(Object other) { Author otherAuthor = (Author) other; boolean isEqual = false, isEqualFirstName = false, isEqualLastName = false; if (this.getOrigin() == Category.INCITES && otherAuthor.getOrigin() == Category.INCITES) { boolean isEqualInstitution = false; is...
Author extends AbstractNode { @Override public boolean equals(Object other) { Author otherAuthor = (Author) other; boolean isEqual = false, isEqualFirstName = false, isEqualLastName = false; if (this.getOrigin() == Category.INCITES && otherAuthor.getOrigin() == Category.INCITES) { boolean isEqualInstitution = false; is...
@Test public void testLinkedList(){ LinkedList<Integer> intList = new LinkedList<Integer>(); assertTrue(intList.add(1)); assertTrue(intList.add(2)); assertEquals(new Integer(1), intList.head()); assertEquals(new Integer(2), intList.tail()); assertTrue(intList.add(3)); assertEquals(new Integer(3), intList.tail()); asser...
public linkedList() { start = null; end = null; size = 0; }
linkedList { public linkedList() { start = null; end = null; size = 0; } }
linkedList { public linkedList() { start = null; end = null; size = 0; } linkedList(); }
linkedList { public linkedList() { start = null; end = null; size = 0; } linkedList(); boolean isEmpty(); int getSize(); void insertAtStart(int val); void insertAtEnd(int val); void insertAtPos(int val , int pos); void deleteAtPos(int pos); void display(); }
linkedList { public linkedList() { start = null; end = null; size = 0; } linkedList(); boolean isEmpty(); int getSize(); void insertAtStart(int val); void insertAtEnd(int val); void insertAtPos(int val , int pos); void deleteAtPos(int pos); void display(); public int size; }
@Test public void testRegisterClass() throws Exception { assertTrue( dialog.extendedClasses.isEmpty() ); dialog.registerClass( "MyClass", "org.pentaho.test.MyClass" ); assertFalse( dialog.extendedClasses.isEmpty() ); assertEquals( "org.pentaho.test.MyClass", dialog.extendedClasses.get( "MyClass" ) ); }
public void registerClass( String key, String className ) { extendedClasses.put( key, className ); }
DatabaseConnectionDialog { public void registerClass( String key, String className ) { extendedClasses.put( key, className ); } }
DatabaseConnectionDialog { public void registerClass( String key, String className ) { extendedClasses.put( key, className ); } DatabaseConnectionDialog(); }
DatabaseConnectionDialog { public void registerClass( String key, String className ) { extendedClasses.put( key, className ); } DatabaseConnectionDialog(); void registerClass( String key, String className ); XulDomContainer getSwtInstance( Shell shell ); XulDomContainer getSwtInstance( SwtXulLoader loader, Shell shell ...
DatabaseConnectionDialog { public void registerClass( String key, String className ) { extendedClasses.put( key, className ); } DatabaseConnectionDialog(); void registerClass( String key, String className ); XulDomContainer getSwtInstance( Shell shell ); XulDomContainer getSwtInstance( SwtXulLoader loader, Shell shell ...
@Test public void testIsEmptyStringArray() { assertTrue( Utils.isEmpty( (String[]) null ) ); assertTrue( Utils.isEmpty( new String[] {} ) ); assertFalse( Utils.isEmpty( new String[] { "test" } ) ); }
public static boolean isEmpty( CharSequence val ) { return val == null || val.length() == 0; }
Utils { public static boolean isEmpty( CharSequence val ) { return val == null || val.length() == 0; } }
Utils { public static boolean isEmpty( CharSequence val ) { return val == null || val.length() == 0; } }
Utils { public static boolean isEmpty( CharSequence val ) { return val == null || val.length() == 0; } static int getDamerauLevenshteinDistance( String s, String t ); static boolean isEmpty( CharSequence val ); static boolean isEmpty( CharSequence[] strings ); static boolean isEmpty( Object[] array ); static boolean i...
Utils { public static boolean isEmpty( CharSequence val ) { return val == null || val.length() == 0; } static int getDamerauLevenshteinDistance( String s, String t ); static boolean isEmpty( CharSequence val ); static boolean isEmpty( CharSequence[] strings ); static boolean isEmpty( Object[] array ); static boolean i...
@Test public void testIsEmptyObjectArray() { assertTrue( Utils.isEmpty( (Object[]) null ) ); assertTrue( Utils.isEmpty( new Object[] {} ) ); assertFalse( Utils.isEmpty( new Object[] { "test" } ) ); }
public static boolean isEmpty( CharSequence val ) { return val == null || val.length() == 0; }
Utils { public static boolean isEmpty( CharSequence val ) { return val == null || val.length() == 0; } }
Utils { public static boolean isEmpty( CharSequence val ) { return val == null || val.length() == 0; } }
Utils { public static boolean isEmpty( CharSequence val ) { return val == null || val.length() == 0; } static int getDamerauLevenshteinDistance( String s, String t ); static boolean isEmpty( CharSequence val ); static boolean isEmpty( CharSequence[] strings ); static boolean isEmpty( Object[] array ); static boolean i...
Utils { public static boolean isEmpty( CharSequence val ) { return val == null || val.length() == 0; } static int getDamerauLevenshteinDistance( String s, String t ); static boolean isEmpty( CharSequence val ); static boolean isEmpty( CharSequence[] strings ); static boolean isEmpty( Object[] array ); static boolean i...
@Test public void testIsEmptyList() { assertTrue( Utils.isEmpty( (List<String>) null ) ); assertTrue( Utils.isEmpty( new ArrayList<String>() ) ); assertFalse( Utils.isEmpty( Arrays.asList( "test", 1 ) ) ); }
public static boolean isEmpty( CharSequence val ) { return val == null || val.length() == 0; }
Utils { public static boolean isEmpty( CharSequence val ) { return val == null || val.length() == 0; } }
Utils { public static boolean isEmpty( CharSequence val ) { return val == null || val.length() == 0; } }
Utils { public static boolean isEmpty( CharSequence val ) { return val == null || val.length() == 0; } static int getDamerauLevenshteinDistance( String s, String t ); static boolean isEmpty( CharSequence val ); static boolean isEmpty( CharSequence[] strings ); static boolean isEmpty( Object[] array ); static boolean i...
Utils { public static boolean isEmpty( CharSequence val ) { return val == null || val.length() == 0; } static int getDamerauLevenshteinDistance( String s, String t ); static boolean isEmpty( CharSequence val ); static boolean isEmpty( CharSequence[] strings ); static boolean isEmpty( Object[] array ); static boolean i...
@Test public void testIsEmptyStringBuffer() { assertTrue( Utils.isEmpty( (StringBuffer) null ) ); assertTrue( Utils.isEmpty( new StringBuffer( "" ) ) ); assertFalse( Utils.isEmpty( new StringBuffer( "test" ) ) ); }
public static boolean isEmpty( CharSequence val ) { return val == null || val.length() == 0; }
Utils { public static boolean isEmpty( CharSequence val ) { return val == null || val.length() == 0; } }
Utils { public static boolean isEmpty( CharSequence val ) { return val == null || val.length() == 0; } }
Utils { public static boolean isEmpty( CharSequence val ) { return val == null || val.length() == 0; } static int getDamerauLevenshteinDistance( String s, String t ); static boolean isEmpty( CharSequence val ); static boolean isEmpty( CharSequence[] strings ); static boolean isEmpty( Object[] array ); static boolean i...
Utils { public static boolean isEmpty( CharSequence val ) { return val == null || val.length() == 0; } static int getDamerauLevenshteinDistance( String s, String t ); static boolean isEmpty( CharSequence val ); static boolean isEmpty( CharSequence[] strings ); static boolean isEmpty( Object[] array ); static boolean i...
@Test public void testIsEmptyStringBuilder() { assertTrue( Utils.isEmpty( (StringBuilder) null ) ); assertTrue( Utils.isEmpty( new StringBuilder( "" ) ) ); assertFalse( Utils.isEmpty( new StringBuilder( "test" ) ) ); }
public static boolean isEmpty( CharSequence val ) { return val == null || val.length() == 0; }
Utils { public static boolean isEmpty( CharSequence val ) { return val == null || val.length() == 0; } }
Utils { public static boolean isEmpty( CharSequence val ) { return val == null || val.length() == 0; } }
Utils { public static boolean isEmpty( CharSequence val ) { return val == null || val.length() == 0; } static int getDamerauLevenshteinDistance( String s, String t ); static boolean isEmpty( CharSequence val ); static boolean isEmpty( CharSequence[] strings ); static boolean isEmpty( Object[] array ); static boolean i...
Utils { public static boolean isEmpty( CharSequence val ) { return val == null || val.length() == 0; } static int getDamerauLevenshteinDistance( String s, String t ); static boolean isEmpty( CharSequence val ); static boolean isEmpty( CharSequence[] strings ); static boolean isEmpty( Object[] array ); static boolean i...
@Test public void testResolvePassword() { String password = "password"; assertSame( password, Utils.resolvePassword( Variables.getADefaultVariableSpace(), password ).intern() ); }
public static String resolvePassword( VariableSpace variables, String password ) { String resolvedPassword = variables.environmentSubstitute( password ); if ( resolvedPassword != null ) { return Encr.decryptPasswordOptionallyEncrypted( resolvedPassword ); } else { return resolvedPassword; } }
Utils { public static String resolvePassword( VariableSpace variables, String password ) { String resolvedPassword = variables.environmentSubstitute( password ); if ( resolvedPassword != null ) { return Encr.decryptPasswordOptionallyEncrypted( resolvedPassword ); } else { return resolvedPassword; } } }
Utils { public static String resolvePassword( VariableSpace variables, String password ) { String resolvedPassword = variables.environmentSubstitute( password ); if ( resolvedPassword != null ) { return Encr.decryptPasswordOptionallyEncrypted( resolvedPassword ); } else { return resolvedPassword; } } }
Utils { public static String resolvePassword( VariableSpace variables, String password ) { String resolvedPassword = variables.environmentSubstitute( password ); if ( resolvedPassword != null ) { return Encr.decryptPasswordOptionallyEncrypted( resolvedPassword ); } else { return resolvedPassword; } } static int getDam...
Utils { public static String resolvePassword( VariableSpace variables, String password ) { String resolvedPassword = variables.environmentSubstitute( password ); if ( resolvedPassword != null ) { return Encr.decryptPasswordOptionallyEncrypted( resolvedPassword ); } else { return resolvedPassword; } } static int getDam...
@Test public void testResolvePasswordEncrypted() { String decPassword = "password"; String encPassword = "Encrypted 2be98afc86aa7f2e4bb18bd63c99dbdde"; assertSame( decPassword, Utils.resolvePassword( Variables.getADefaultVariableSpace(), encPassword ).intern() ); }
public static String resolvePassword( VariableSpace variables, String password ) { String resolvedPassword = variables.environmentSubstitute( password ); if ( resolvedPassword != null ) { return Encr.decryptPasswordOptionallyEncrypted( resolvedPassword ); } else { return resolvedPassword; } }
Utils { public static String resolvePassword( VariableSpace variables, String password ) { String resolvedPassword = variables.environmentSubstitute( password ); if ( resolvedPassword != null ) { return Encr.decryptPasswordOptionallyEncrypted( resolvedPassword ); } else { return resolvedPassword; } } }
Utils { public static String resolvePassword( VariableSpace variables, String password ) { String resolvedPassword = variables.environmentSubstitute( password ); if ( resolvedPassword != null ) { return Encr.decryptPasswordOptionallyEncrypted( resolvedPassword ); } else { return resolvedPassword; } } }
Utils { public static String resolvePassword( VariableSpace variables, String password ) { String resolvedPassword = variables.environmentSubstitute( password ); if ( resolvedPassword != null ) { return Encr.decryptPasswordOptionallyEncrypted( resolvedPassword ); } else { return resolvedPassword; } } static int getDam...
Utils { public static String resolvePassword( VariableSpace variables, String password ) { String resolvedPassword = variables.environmentSubstitute( password ); if ( resolvedPassword != null ) { return Encr.decryptPasswordOptionallyEncrypted( resolvedPassword ); } else { return resolvedPassword; } } static int getDam...
@Test public void testResolvePasswordNull() { String password = null; assertSame( password, Utils.resolvePassword( Variables.getADefaultVariableSpace(), password ) ); }
public static String resolvePassword( VariableSpace variables, String password ) { String resolvedPassword = variables.environmentSubstitute( password ); if ( resolvedPassword != null ) { return Encr.decryptPasswordOptionallyEncrypted( resolvedPassword ); } else { return resolvedPassword; } }
Utils { public static String resolvePassword( VariableSpace variables, String password ) { String resolvedPassword = variables.environmentSubstitute( password ); if ( resolvedPassword != null ) { return Encr.decryptPasswordOptionallyEncrypted( resolvedPassword ); } else { return resolvedPassword; } } }
Utils { public static String resolvePassword( VariableSpace variables, String password ) { String resolvedPassword = variables.environmentSubstitute( password ); if ( resolvedPassword != null ) { return Encr.decryptPasswordOptionallyEncrypted( resolvedPassword ); } else { return resolvedPassword; } } }
Utils { public static String resolvePassword( VariableSpace variables, String password ) { String resolvedPassword = variables.environmentSubstitute( password ); if ( resolvedPassword != null ) { return Encr.decryptPasswordOptionallyEncrypted( resolvedPassword ); } else { return resolvedPassword; } } static int getDam...
Utils { public static String resolvePassword( VariableSpace variables, String password ) { String resolvedPassword = variables.environmentSubstitute( password ); if ( resolvedPassword != null ) { return Encr.decryptPasswordOptionallyEncrypted( resolvedPassword ); } else { return resolvedPassword; } } static int getDam...
@Test public void testResolvePasswordVariable() { String passwordKey = "PASS_VAR"; String passwordVar = "${" + passwordKey + "}"; String passwordValue = "password"; Variables vars = new Variables(); vars.setVariable( passwordKey, passwordValue ); assertSame( passwordValue, Utils.resolvePassword( vars, passwordVar ).int...
public static String resolvePassword( VariableSpace variables, String password ) { String resolvedPassword = variables.environmentSubstitute( password ); if ( resolvedPassword != null ) { return Encr.decryptPasswordOptionallyEncrypted( resolvedPassword ); } else { return resolvedPassword; } }
Utils { public static String resolvePassword( VariableSpace variables, String password ) { String resolvedPassword = variables.environmentSubstitute( password ); if ( resolvedPassword != null ) { return Encr.decryptPasswordOptionallyEncrypted( resolvedPassword ); } else { return resolvedPassword; } } }
Utils { public static String resolvePassword( VariableSpace variables, String password ) { String resolvedPassword = variables.environmentSubstitute( password ); if ( resolvedPassword != null ) { return Encr.decryptPasswordOptionallyEncrypted( resolvedPassword ); } else { return resolvedPassword; } } }
Utils { public static String resolvePassword( VariableSpace variables, String password ) { String resolvedPassword = variables.environmentSubstitute( password ); if ( resolvedPassword != null ) { return Encr.decryptPasswordOptionallyEncrypted( resolvedPassword ); } else { return resolvedPassword; } } static int getDam...
Utils { public static String resolvePassword( VariableSpace variables, String password ) { String resolvedPassword = variables.environmentSubstitute( password ); if ( resolvedPassword != null ) { return Encr.decryptPasswordOptionallyEncrypted( resolvedPassword ); } else { return resolvedPassword; } } static int getDam...
@Test public void testNormalizeArraysMethods() { String[] s1 = new String[] { "one" }; String[] s2 = new String[] { "one", "two" }; String[] s3 = new String[] { "one", "two", "three" }; long[] l1 = new long[] { 1 }; long[] l2 = new long[] { 1, 2 }; long[] l3 = new long[] { 1, 2, 3 }; short[] sh1 = new short[] { 1 }; sh...
public static String[][] normalizeArrays( int normalizeToLength, String[]... arraysToNormalize ) { if ( arraysToNormalize == null ) { return null; } int arraysToProcess = arraysToNormalize.length; String[][] rtn = new String[ arraysToProcess ][]; for ( int i = 0; i < arraysToNormalize.length; i++ ) { String[] nextArray...
Utils { public static String[][] normalizeArrays( int normalizeToLength, String[]... arraysToNormalize ) { if ( arraysToNormalize == null ) { return null; } int arraysToProcess = arraysToNormalize.length; String[][] rtn = new String[ arraysToProcess ][]; for ( int i = 0; i < arraysToNormalize.length; i++ ) { String[] n...
Utils { public static String[][] normalizeArrays( int normalizeToLength, String[]... arraysToNormalize ) { if ( arraysToNormalize == null ) { return null; } int arraysToProcess = arraysToNormalize.length; String[][] rtn = new String[ arraysToProcess ][]; for ( int i = 0; i < arraysToNormalize.length; i++ ) { String[] n...
Utils { public static String[][] normalizeArrays( int normalizeToLength, String[]... arraysToNormalize ) { if ( arraysToNormalize == null ) { return null; } int arraysToProcess = arraysToNormalize.length; String[][] rtn = new String[ arraysToProcess ][]; for ( int i = 0; i < arraysToNormalize.length; i++ ) { String[] n...
Utils { public static String[][] normalizeArrays( int normalizeToLength, String[]... arraysToNormalize ) { if ( arraysToNormalize == null ) { return null; } int arraysToProcess = arraysToNormalize.length; String[][] rtn = new String[ arraysToProcess ][]; for ( int i = 0; i < arraysToNormalize.length; i++ ) { String[] n...
@Test public void testNoAuthentication() throws URISyntaxException { sessionConfigurator = new SessionConfigurator( new URI( "ws: sessionConfigurator.beforeRequest( headers ); verify( headers, times( 0 ) ).put( any(), any() ); }
@Override public void beforeRequest( Map<String, List<String>> headers ) { if ( withAuth ) { Header authenticationHeader = getAuthenticationHeader( url ); if ( authenticationHeader != null ) { headers .put( authenticationHeader.getName(), Collections.singletonList( authenticationHeader.getValue() ) ); } } }
SessionConfigurator extends ClientEndpointConfig.Configurator { @Override public void beforeRequest( Map<String, List<String>> headers ) { if ( withAuth ) { Header authenticationHeader = getAuthenticationHeader( url ); if ( authenticationHeader != null ) { headers .put( authenticationHeader.getName(), Collections.singl...
SessionConfigurator extends ClientEndpointConfig.Configurator { @Override public void beforeRequest( Map<String, List<String>> headers ) { if ( withAuth ) { Header authenticationHeader = getAuthenticationHeader( url ); if ( authenticationHeader != null ) { headers .put( authenticationHeader.getName(), Collections.singl...
SessionConfigurator extends ClientEndpointConfig.Configurator { @Override public void beforeRequest( Map<String, List<String>> headers ) { if ( withAuth ) { Header authenticationHeader = getAuthenticationHeader( url ); if ( authenticationHeader != null ) { headers .put( authenticationHeader.getName(), Collections.singl...
SessionConfigurator extends ClientEndpointConfig.Configurator { @Override public void beforeRequest( Map<String, List<String>> headers ) { if ( withAuth ) { Header authenticationHeader = getAuthenticationHeader( url ); if ( authenticationHeader != null ) { headers .put( authenticationHeader.getName(), Collections.singl...
@Test public void testGetFieldDefinition() { assertEquals( "FOO TIMESTAMP", nativeMeta.getFieldDefinition( new ValueMetaDate( "FOO" ), "", "", false, true, false ) ); assertEquals( "TIMESTAMP", nativeMeta.getFieldDefinition( new ValueMetaTimestamp( "FOO" ), "", "", false, false, false ) ); String[] typeCk = new String[...
@Override public String getFieldDefinition( ValueMetaInterface v, String tk, String pk, boolean use_autoinc, boolean add_fieldname, boolean add_cr ) { StringBuilder retval = new StringBuilder(); String fieldname = v.getName(); int length = v.getLength(); int precision = v.getPrecision(); Boolean mode = MonetDBDatabaseM...
MonetDBDatabaseMeta extends BaseDatabaseMeta implements DatabaseInterface { @Override public String getFieldDefinition( ValueMetaInterface v, String tk, String pk, boolean use_autoinc, boolean add_fieldname, boolean add_cr ) { StringBuilder retval = new StringBuilder(); String fieldname = v.getName(); int length = v.ge...
MonetDBDatabaseMeta extends BaseDatabaseMeta implements DatabaseInterface { @Override public String getFieldDefinition( ValueMetaInterface v, String tk, String pk, boolean use_autoinc, boolean add_fieldname, boolean add_cr ) { StringBuilder retval = new StringBuilder(); String fieldname = v.getName(); int length = v.ge...
MonetDBDatabaseMeta extends BaseDatabaseMeta implements DatabaseInterface { @Override public String getFieldDefinition( ValueMetaInterface v, String tk, String pk, boolean use_autoinc, boolean add_fieldname, boolean add_cr ) { StringBuilder retval = new StringBuilder(); String fieldname = v.getName(); int length = v.ge...
MonetDBDatabaseMeta extends BaseDatabaseMeta implements DatabaseInterface { @Override public String getFieldDefinition( ValueMetaInterface v, String tk, String pk, boolean use_autoinc, boolean add_fieldname, boolean add_cr ) { StringBuilder retval = new StringBuilder(); String fieldname = v.getName(); int length = v.ge...
@Test public void testGetFieldDefinition( ) throws Exception { assertEquals( "CHAR(1)", nativeMeta.getFieldDefinition( new ValueMetaBoolean( "BAR" ), "", "", false, false, false ) ); assertEquals( "BIGINT", nativeMeta.getFieldDefinition( new ValueMetaNumber( "BAR", 10, 0 ), "", "", false, false, false ) ); assertEquals...
@Override public String getFieldDefinition( ValueMetaInterface v, String tk, String pk, boolean use_autoinc, boolean add_fieldname, boolean add_cr ) { String retval = ""; String fieldname = v.getName(); int length = v.getLength(); int precision = v.getPrecision(); if ( add_fieldname ) { retval += fieldname + " "; } int...
MSSQLServerDatabaseMeta extends BaseDatabaseMeta implements DatabaseInterface { @Override public String getFieldDefinition( ValueMetaInterface v, String tk, String pk, boolean use_autoinc, boolean add_fieldname, boolean add_cr ) { String retval = ""; String fieldname = v.getName(); int length = v.getLength(); int preci...
MSSQLServerDatabaseMeta extends BaseDatabaseMeta implements DatabaseInterface { @Override public String getFieldDefinition( ValueMetaInterface v, String tk, String pk, boolean use_autoinc, boolean add_fieldname, boolean add_cr ) { String retval = ""; String fieldname = v.getName(); int length = v.getLength(); int preci...
MSSQLServerDatabaseMeta extends BaseDatabaseMeta implements DatabaseInterface { @Override public String getFieldDefinition( ValueMetaInterface v, String tk, String pk, boolean use_autoinc, boolean add_fieldname, boolean add_cr ) { String retval = ""; String fieldname = v.getName(); int length = v.getLength(); int preci...
MSSQLServerDatabaseMeta extends BaseDatabaseMeta implements DatabaseInterface { @Override public String getFieldDefinition( ValueMetaInterface v, String tk, String pk, boolean use_autoinc, boolean add_fieldname, boolean add_cr ) { String retval = ""; String fieldname = v.getName(); int length = v.getLength(); int preci...
@Test public void testCheckIndexExists() throws Exception { String expectedSQL = "select i.name table_name, c.name column_name from sysindexes i, sysindexkeys k, syscolumns c where i.name = 'FOO' AND i.id = k.id AND i.id = c.id AND k.colid = c.colid "; Database db = Mockito.mock( Database.class ); RowMetaInterface rm =...
@Override public boolean checkIndexExists( Database database, String schemaName, String tableName, String[] idx_fields ) throws KettleDatabaseException { String tablename = database.getDatabaseMeta().getQuotedSchemaTableCombination( schemaName, tableName ); boolean[] exists = new boolean[idx_fields.length]; for ( int i...
MSSQLServerDatabaseMeta extends BaseDatabaseMeta implements DatabaseInterface { @Override public boolean checkIndexExists( Database database, String schemaName, String tableName, String[] idx_fields ) throws KettleDatabaseException { String tablename = database.getDatabaseMeta().getQuotedSchemaTableCombination( schemaN...
MSSQLServerDatabaseMeta extends BaseDatabaseMeta implements DatabaseInterface { @Override public boolean checkIndexExists( Database database, String schemaName, String tableName, String[] idx_fields ) throws KettleDatabaseException { String tablename = database.getDatabaseMeta().getQuotedSchemaTableCombination( schemaN...
MSSQLServerDatabaseMeta extends BaseDatabaseMeta implements DatabaseInterface { @Override public boolean checkIndexExists( Database database, String schemaName, String tableName, String[] idx_fields ) throws KettleDatabaseException { String tablename = database.getDatabaseMeta().getQuotedSchemaTableCombination( schemaN...
MSSQLServerDatabaseMeta extends BaseDatabaseMeta implements DatabaseInterface { @Override public boolean checkIndexExists( Database database, String schemaName, String tableName, String[] idx_fields ) throws KettleDatabaseException { String tablename = database.getDatabaseMeta().getQuotedSchemaTableCombination( schemaN...