@Test public void getProperties() { s3Details.setName( "name" ); s3Details.setRegion( "aws-west-1" ); s3Details.setAccessKey( "ASIAXJ3TZZPFVO3NK6O" ); s3Details.setSecretKey( "jKbmptEdHk6cTXXqGodacxJn5yaETIIhKjJb/oZ" ); Map<String, String> props = s3Details.getProperties(); assertThat( props.get( "name" ), equalTo( "name" ) ); assertThat( props.get( "region" ), equalTo( "aws-west-1" ) ); assertThat( props.get( "accessKey" ), equalTo( "ASIAXJ3TZZPFVO3NK6O" ) ); assertThat( props.get( "secretKey" ), equalTo( "jKbmptEdHk6cTXXqGodacxJn5yaETIIhKjJb/oZ" ) ); assertThat( props.size(), equalTo( 15 ) ); assertThat( props.entrySet().stream().filter( e -> e.getValue() != null ).count(), equalTo( 4L ) ); }
@Override public Map<String, String> getProperties() { Map<String, String> props = new HashMap<>(); props.put( "name", getName() ); props.put( "description", getDescription() ); props.put( "accessKey", getAccessKey() ); props.put( "secretKey", getSecretKey() ); props.put( "sessionToken", getSessionToken() ); props.put( "credentialsFilePath", getCredentialsFilePath() ); props.put( "credentialsFile", getCredentialsFile() ); props.put( "authType", getAuthType() ); props.put( "region", getRegion() ); props.put( "profileName", getProfileName() ); props.put( "endpoint", getEndpoint() ); props.put( "signatureVersion", getSignatureVersion() ); props.put( "pathStyleAccess", getPathStyleAccess() ); props.put( "defaultS3Config", getDefaultS3Config() ); props.put( "connectionType", getConnectionType() ); return props; }
S3Details implements VFSConnectionDetails { @Override public Map<String, String> getProperties() { Map<String, String> props = new HashMap<>(); props.put( "name", getName() ); props.put( "description", getDescription() ); props.put( "accessKey", getAccessKey() ); props.put( "secretKey", getSecretKey() ); props.put( "sessionToken", getSessionToken() ); props.put( "credentialsFilePath", getCredentialsFilePath() ); props.put( "credentialsFile", getCredentialsFile() ); props.put( "authType", getAuthType() ); props.put( "region", getRegion() ); props.put( "profileName", getProfileName() ); props.put( "endpoint", getEndpoint() ); props.put( "signatureVersion", getSignatureVersion() ); props.put( "pathStyleAccess", getPathStyleAccess() ); props.put( "defaultS3Config", getDefaultS3Config() ); props.put( "connectionType", getConnectionType() ); return props; } }
S3Details implements VFSConnectionDetails { @Override public Map<String, String> getProperties() { Map<String, String> props = new HashMap<>(); props.put( "name", getName() ); props.put( "description", getDescription() ); props.put( "accessKey", getAccessKey() ); props.put( "secretKey", getSecretKey() ); props.put( "sessionToken", getSessionToken() ); props.put( "credentialsFilePath", getCredentialsFilePath() ); props.put( "credentialsFile", getCredentialsFile() ); props.put( "authType", getAuthType() ); props.put( "region", getRegion() ); props.put( "profileName", getProfileName() ); props.put( "endpoint", getEndpoint() ); props.put( "signatureVersion", getSignatureVersion() ); props.put( "pathStyleAccess", getPathStyleAccess() ); props.put( "defaultS3Config", getDefaultS3Config() ); props.put( "connectionType", getConnectionType() ); return props; }  }
S3Details implements VFSConnectionDetails { @Override public Map<String, String> getProperties() { Map<String, String> props = new HashMap<>(); props.put( "name", getName() ); props.put( "description", getDescription() ); props.put( "accessKey", getAccessKey() ); props.put( "secretKey", getSecretKey() ); props.put( "sessionToken", getSessionToken() ); props.put( "credentialsFilePath", getCredentialsFilePath() ); props.put( "credentialsFile", getCredentialsFile() ); props.put( "authType", getAuthType() ); props.put( "region", getRegion() ); props.put( "profileName", getProfileName() ); props.put( "endpoint", getEndpoint() ); props.put( "signatureVersion", getSignatureVersion() ); props.put( "pathStyleAccess", getPathStyleAccess() ); props.put( "defaultS3Config", getDefaultS3Config() ); props.put( "connectionType", getConnectionType() ); return props; }  @Override String getName(); @Override void setName( String name ); @Override String getType(); @Override String getDescription(); void setDescription( String description ); String getAccessKey(); void setAccessKey( String accessKey ); String getSecretKey(); void setSecretKey( String secretKey ); String getSessionToken(); void setSessionToken( String sessionToken ); String getCredentialsFilePath(); void setCredentialsFilePath( String credentialsFilePath ); String getCredentialsFile(); void setCredentialsFile( String credentialsFile ); String getAuthType(); void setAuthType( String authType ); List<String> getRegions(); String getRegion(); void setRegion( String region ); String getProfileName(); void setProfileName( String profileName ); String getEndpoint(); void setEndpoint( String endpoint ); String getSignatureVersion(); void setSignatureVersion( String signatureVersion ); String getPathStyleAccess(); void setPathStyleAccess( String pathStyleAccess ); String getDefaultS3Config(); void setDefaultS3Config( String defaultS3Config ); String getConnectionType(); void setConnectionType( String connectionType ); @Override Map<String, String> getProperties(); }
S3Details implements VFSConnectionDetails { @Override public Map<String, String> getProperties() { Map<String, String> props = new HashMap<>(); props.put( "name", getName() ); props.put( "description", getDescription() ); props.put( "accessKey", getAccessKey() ); props.put( "secretKey", getSecretKey() ); props.put( "sessionToken", getSessionToken() ); props.put( "credentialsFilePath", getCredentialsFilePath() ); props.put( "credentialsFile", getCredentialsFile() ); props.put( "authType", getAuthType() ); props.put( "region", getRegion() ); props.put( "profileName", getProfileName() ); props.put( "endpoint", getEndpoint() ); props.put( "signatureVersion", getSignatureVersion() ); props.put( "pathStyleAccess", getPathStyleAccess() ); props.put( "defaultS3Config", getDefaultS3Config() ); props.put( "connectionType", getConnectionType() ); return props; }  @Override String getName(); @Override void setName( String name ); @Override String getType(); @Override String getDescription(); void setDescription( String description ); String getAccessKey(); void setAccessKey( String accessKey ); String getSecretKey(); void setSecretKey( String secretKey ); String getSessionToken(); void setSessionToken( String sessionToken ); String getCredentialsFilePath(); void setCredentialsFilePath( String credentialsFilePath ); String getCredentialsFile(); void setCredentialsFile( String credentialsFile ); String getAuthType(); void setAuthType( String authType ); List<String> getRegions(); String getRegion(); void setRegion( String region ); String getProfileName(); void setProfileName( String profileName ); String getEndpoint(); void setEndpoint( String endpoint ); String getSignatureVersion(); void setSignatureVersion( String signatureVersion ); String getPathStyleAccess(); void setPathStyleAccess( String pathStyleAccess ); String getDefaultS3Config(); void setDefaultS3Config( String defaultS3Config ); String getConnectionType(); void setConnectionType( String connectionType ); @Override Map<String, String> getProperties(); static final String CONNECTION_TYPE_AWS; static final String CONNECTION_TYPE_MINIO; }