Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Open Subsurface Data Universe Software
Platform
Deployment and Operations
Backup Service
Commits
af268785
Commit
af268785
authored
Dec 14, 2020
by
Anastasiia Gelmut
Browse files
Fixed Sonar Comments
parent
e5e05dc7
Changes
30
Hide whitespace changes
Inline
Side-by-side
backup-core/src/main/java/org/opengroup/osdu/backup/config/AssetLocatorConfig.java
View file @
af268785
/*
Copyright 2020 Google LLC
Copyright 2020 EPAM Systems, Inc
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package
org.opengroup.osdu.backup.config
;
import
org.opengroup.osdu.backup.locator.AssetManagerFactory
;
...
...
@@ -9,12 +26,11 @@ import org.springframework.context.annotation.Configuration;
@Configuration
public
class
AssetLocatorConfig
{
@Bean
public
FactoryBean
serviceLocatorFactoryBean
()
{
ServiceLocatorFactoryBean
factoryBean
=
new
ServiceLocatorFactoryBean
();
factoryBean
.
setServiceLocatorInterface
(
AssetManagerFactory
.
class
);
factoryBean
.
setServiceLocatorExceptionClass
(
AssetServiceLocatorException
.
class
);
return
factoryBean
;
}
@Bean
public
FactoryBean
serviceLocatorFactoryBean
()
{
ServiceLocatorFactoryBean
factoryBean
=
new
ServiceLocatorFactoryBean
();
factoryBean
.
setServiceLocatorInterface
(
AssetManagerFactory
.
class
);
factoryBean
.
setServiceLocatorExceptionClass
(
AssetServiceLocatorException
.
class
);
return
factoryBean
;
}
}
backup-core/src/main/java/org/opengroup/osdu/backup/exception/ScheduleException.java
View file @
af268785
/*
Copyright 2020 Google LLC
Copyright 2020 EPAM Systems, Inc
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package
org.opengroup.osdu.backup.exception
;
public
class
ScheduleException
extends
RuntimeException
{
...
...
backup-core/src/main/java/org/opengroup/osdu/backup/locator/Asset.java
View file @
af268785
/*
Copyright 2020 Google LLC
Copyright 2020 EPAM Systems, Inc
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package
org.opengroup.osdu.backup.locator
;
public
enum
Asset
{
...
...
backup-core/src/main/java/org/opengroup/osdu/backup/locator/AssetManagerFactory.java
View file @
af268785
/*
Copyright 2020 Google LLC
Copyright 2020 EPAM Systems, Inc
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package
org.opengroup.osdu.backup.locator
;
import
org.opengroup.osdu.backup.manager.AssetBackupManager
;
...
...
backup-core/src/main/java/org/opengroup/osdu/backup/manager/AssetBackupManager.java
View file @
af268785
/*
Copyright 2020 Google LLC
Copyright 2020 EPAM Systems, Inc
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package
org.opengroup.osdu.backup.manager
;
import
java.util.List
;
...
...
backup-core/src/main/java/org/opengroup/osdu/backup/model/BackupImportRequest.java
View file @
af268785
/*
Copyright 2020 Google LLC
Copyright 2020 EPAM Systems, Inc
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package
org.opengroup.osdu.backup.model
;
import
lombok.AllArgsConstructor
;
...
...
backup-core/src/main/java/org/opengroup/osdu/backup/model/BackupSchedule.java
View file @
af268785
/*
Copyright 2020 Google LLC
Copyright 2020 EPAM Systems, Inc
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package
org.opengroup.osdu.backup.model
;
import
java.util.Map
;
...
...
backup-core/src/main/java/org/opengroup/osdu/backup/model/BackupStamp.java
View file @
af268785
/*
Copyright 2020 Google LLC
Copyright 2020 EPAM Systems, Inc
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package
org.opengroup.osdu.backup.model
;
import
java.util.Map
;
...
...
backup-core/src/main/java/org/opengroup/osdu/backup/repository/BackupStampRepository.java
View file @
af268785
/*
Copyright 2020 Google LLC
Copyright 2020 EPAM Systems, Inc
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package
org.opengroup.osdu.backup.repository
;
import
java.util.EnumMap
;
...
...
backup-core/src/main/java/org/opengroup/osdu/backup/repository/ScheduleRepository.java
View file @
af268785
/*
Copyright 2020 Google LLC
Copyright 2020 EPAM Systems, Inc
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package
org.opengroup.osdu.backup.repository
;
import
java.util.List
;
...
...
backup-core/src/main/java/org/opengroup/osdu/backup/service/BackupService.java
View file @
af268785
/*
Copyright 2020 Google LLC
Copyright 2020 EPAM Systems, Inc
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package
org.opengroup.osdu.backup.service
;
import
java.util.EnumMap
;
...
...
backup-core/src/main/java/org/opengroup/osdu/backup/service/impl/BackupServiceImpl.java
View file @
af268785
/*
Copyright 2020 Google LLC
Copyright 2020 EPAM Systems, Inc
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package
org.opengroup.osdu.backup.service.impl
;
...
...
backup-core/src/main/java/org/opengroup/osdu/backup/shedulers/BackupScheduledTask.java
View file @
af268785
/*
Copyright 2020 Google LLC
Copyright 2020 EPAM Systems, Inc
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package
org.opengroup.osdu.backup.shedulers
;
import
lombok.RequiredArgsConstructor
;
...
...
backup-core/src/main/java/org/opengroup/osdu/backup/shedulers/SchedulerService.java
View file @
af268785
/*
Copyright 2020 Google LLC
Copyright 2020 EPAM Systems, Inc
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package
org.opengroup.osdu.backup.shedulers
;
import
org.opengroup.osdu.backup.model.BackupCollection
;
...
...
backup-core/src/main/java/org/opengroup/osdu/backup/shedulers/TearDownBackupScheduledTask.java
View file @
af268785
/*
Copyright 2020 Google LLC
Copyright 2020 EPAM Systems, Inc
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package
org.opengroup.osdu.backup.shedulers
;
import
static
java
.
util
.
Objects
.
isNull
;
...
...
backup-core/src/main/java/org/opengroup/osdu/backup/shedulers/impl/SchedulerServiceImpl.java
View file @
af268785
/*
Copyright 2020 Google LLC
Copyright 2020 EPAM Systems, Inc
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package
org.opengroup.osdu.backup.shedulers.impl
;
import
java.util.HashMap
;
...
...
backup-core/src/main/java/org/opengroup/osdu/backup/shedulers/impl/TearDownScheduler.java
View file @
af268785
/*
Copyright 2020 Google LLC
Copyright 2020 EPAM Systems, Inc
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package
org.opengroup.osdu.backup.shedulers.impl
;
import
javax.annotation.PostConstruct
;
...
...
backup-core/src/main/java/org/opengroup/osdu/backup/swagger/HomeController.java
View file @
af268785
...
...
@@ -17,11 +17,11 @@
package
org.opengroup.osdu.backup.swagger
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.
Reques
tMapping
;
import
org.springframework.web.bind.annotation.
Ge
tMapping
;
@Controller
public
class
HomeController
{
@
Reques
tMapping
(
value
=
"/swagger"
)
@
Ge
tMapping
(
value
=
"/swagger"
)
public
String
swagger
()
{
return
"redirect:swagger-ui.html"
;
}
...
...
backup-core/src/test/java/org/opengroup/osdu/backup/shedulers/impl/SchedulerServiceImplTest.java
View file @
af268785
...
...
@@ -75,15 +75,4 @@ public class SchedulerServiceImplTest {
verify
(
assetBackupManager
,
times
(
1
)).
exportBackup
(
any
());
Assert
.
assertTrue
(
schedulerService
.
cancelScheduledTask
(
backupSchedule
));
}
@Test
public
void
taskStatusChanged
()
throws
InterruptedException
{
// schedulerService.addTaskToScheduler(backupSchedule);
// sleep(1000);
// verify(assetBackupManager, times(1)).exportBackup(any());
// /*backupSchedule.setActive(false);*/
// schedulerService.updateTask(backupSchedule);
// verifyNoMoreInteractions(assetBackupManager);
}
}
\ No newline at end of file
provider/backup-gcp/src/main/java/org/opengroup/osdu/backup/provider/gcp/GcpPackageMarker.java
View file @
af268785
/*
Copyright 2020 Google LLC
Copyright 2020 EPAM Systems, Inc
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package
org.opengroup.osdu.backup.provider.gcp
;
public
interface
GcpPackageMarker
{
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment