Skip to content
GitLab
Menu
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
System
Schema
Commits
17fa008d
Commit
17fa008d
authored
Feb 03, 2021
by
Riabokon Stanislav(EPAM)[GCP]
Browse files
Fixed EntitlementsClientFactory
parent
79b7648b
Changes
1
Hide whitespace changes
Inline
Side-by-side
schema-core/src/main/java/org/opengroup/osdu/schema/util/EntitlementsClientFactory.java
View file @
17fa008d
...
...
@@ -19,6 +19,7 @@ import org.opengroup.osdu.core.common.entitlements.EntitlementsAPIConfig;
import
org.opengroup.osdu.core.common.entitlements.EntitlementsFactory
;
import
org.opengroup.osdu.core.common.entitlements.IEntitlementsFactory
;
import
org.opengroup.osdu.core.common.http.json.HttpResponseBodyMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.config.AbstractFactoryBean
;
import
org.springframework.stereotype.Component
;
...
...
@@ -27,25 +28,27 @@ import org.springframework.stereotype.Component;
@RequiredArgsConstructor
public
class
EntitlementsClientFactory
extends
AbstractFactoryBean
<
IEntitlementsFactory
>
{
@Value
(
"${AUTHORIZE_API}"
)
private
String
api
;
@Value
(
"${AUTHORIZE_API}"
)
private
String
api
;
@Value
(
"${AUTHORIZE_API_KEY}"
)
private
String
apiKey
;
@Autowired
private
HttpResponseBodyMapper
bodyMapper
;
@Value
(
"${AUTHORIZE_API_KEY}"
)
private
String
apiKey
;
private
final
HttpResponseBodyMapper
responseBodyMapper
;
@Autowired
private
HttpResponseBodyMapper
bodyMapper
;
@Override
protected
IEntitlementsFactory
createInstance
()
throws
Exception
{
private
final
HttpResponseBodyMapper
responseBodyMapper
;
return
new
EntitlementsFactory
(
EntitlementsAPIConfig
.
builder
().
rootUrl
(
this
.
api
).
apiKey
(
this
.
apiKey
).
build
(),
responseBodyMapper
);
}
@Override
protected
IEntitlementsFactory
createInstance
()
throws
Exception
{
@Override
public
Class
<?>
getObjectType
()
{
return
IEntitlementsFactory
.
class
;
}
return
new
EntitlementsFactory
(
EntitlementsAPIConfig
.
builder
().
rootUrl
(
this
.
api
).
apiKey
(
this
.
apiKey
).
build
(),
responseBodyMapper
);
}
@Override
public
Class
<?>
getObjectType
()
{
return
IEntitlementsFactory
.
class
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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