-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
updated osgi annotatation in jobs #314
updated osgi annotatation in jobs #314
Conversation
@Component | ||
@Service(ExternalSnippetHttpClient.class) | ||
@Component(service = ExternalSnippetHttpClient.class) | ||
@Designate(ocd = ExternalSnippetHttpClientConf.class) | ||
public class ExternalSnippetHttpClient { | ||
|
||
private static final Logger LOGGER = LoggerFactory.getLogger(ExternalSnippetHttpClient.class); | ||
|
||
private static final long DEFAULT_CONNECTION_TTL = 60L; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those values were moved to ExternalSnippetHttpClientConf
so you probably can remove it from here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
@@ -35,6 +35,18 @@ | |||
|
|||
<dependencies> | |||
<!-- project --> | |||
<dependency> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may get rid of
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.scr.annotations</artifactId>
</dependency>
and
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.commons.osgi</artifactId>
</dependency>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
name = SOURCE_COLLECTOR_TIMEOUT_VALUE, | ||
description = "Timeout value for source collector [ms]", | ||
type = AttributeType.INTEGER) | ||
int timeoutValue() default DEFAULT_TIMEOUT; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With new @AttributeDefinition annotation, the name
property is just a human-readable name (i.e. label for the property) - the property name itself is identified by the method name (timeoutValue
). So now the method names should be equal to the value of name
property on the old @Property
annotations - otherwise we'll need to change property names in all karaf configuration files for this component.
Migrate Felix annotations to OSGi in Jobs module
Types of changes
Checklist:
I hereby agree to the terms of the AET Contributor License Agreement.