mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-25 06:58:39 +00:00
rename method to to discourage direct usage
This commit is contained in:
@@ -41,7 +41,7 @@ public interface FileStorageService {
|
||||
* @throws IllegalArgumentException
|
||||
* if {@code name} is not a valid property name
|
||||
*/
|
||||
void setProperty(String name, String value) throws IllegalArgumentException;
|
||||
void internalSetProperty(String name, String value) throws IllegalArgumentException;
|
||||
|
||||
String getName();
|
||||
|
||||
|
||||
+1
-1
@@ -139,7 +139,7 @@ public class AmazonS3FileStorageServiceImpl implements FileStorageService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setProperty(String name, String value) {
|
||||
public void internalSetProperty(String name, String value) {
|
||||
if (!properties.containsKey(name)) {
|
||||
throw new IllegalArgumentException("Property " + name + " does not exist");
|
||||
}
|
||||
|
||||
+7
-2
@@ -20,6 +20,11 @@ import com.sap.sse.osgi.CachedOsgiTypeBasedServiceFinderFactory;
|
||||
* Implements {@link ServiceTrackerCustomizer} so that all {@link FileStorageServices} announced in the
|
||||
* registry can receive their stored properties.
|
||||
*
|
||||
* TODO implements Replicable, build Operations
|
||||
* add fully qualified classname of Replicable to java/target/env.sh
|
||||
* register as Replicable OSGi service (com.sap.sse.security.impl.Activator#83)
|
||||
* TODO store active selection
|
||||
*
|
||||
* @author Fredrik Teschke
|
||||
*
|
||||
*/
|
||||
@@ -77,7 +82,7 @@ public class FileStorageManagementServiceImpl implements FileStorageManagementSe
|
||||
throws NoCorrespondingServiceRegisteredException, IllegalArgumentException {
|
||||
//TODO replicate
|
||||
propertyStore.writeProperty(serviceName, propertyName, propertyValue);
|
||||
serviceFinder.findService(serviceName).setProperty(propertyName, propertyValue);
|
||||
serviceFinder.findService(serviceName).internalSetProperty(propertyName, propertyValue);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -85,7 +90,7 @@ public class FileStorageManagementServiceImpl implements FileStorageManagementSe
|
||||
FileStorageService service = context.getService(reference);
|
||||
logger.info("Found new FileStorageService: adding properties to " + service.getName());
|
||||
for (Entry<String, String> property : propertyStore.readAllProperties(service.getName()).entrySet()) {
|
||||
service.setProperty(property.getKey(), property.getValue());
|
||||
service.internalSetProperty(property.getKey(), property.getValue());
|
||||
}
|
||||
return service;
|
||||
}
|
||||
|
||||
+1
-1
@@ -82,7 +82,7 @@ public class LocalFileStorageServiceImpl implements FileStorageService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setProperty(String name, String value) throws IllegalArgumentException {
|
||||
public void internalSetProperty(String name, String value) throws IllegalArgumentException {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
+3
-3
@@ -10,9 +10,9 @@ public class AmazonS3TestSupport {
|
||||
|
||||
public static AmazonS3FileStorageServiceImpl createService() throws InvalidPropertiesException {
|
||||
AmazonS3FileStorageServiceImpl service = new AmazonS3FileStorageServiceImpl();
|
||||
service.setProperty("accessId", s3AccessId);
|
||||
service.setProperty("accessKey", s3AccessKey);
|
||||
service.setProperty("bucketName", s3BucketName);
|
||||
service.internalSetProperty("accessId", s3AccessId);
|
||||
service.internalSetProperty("accessKey", s3AccessKey);
|
||||
service.internalSetProperty("bucketName", s3BucketName);
|
||||
service.testProperties();
|
||||
return service;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user