-
Notifications
You must be signed in to change notification settings - Fork 20
Factoring apart component builds for easier overriding #74
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
Conversation
|
This PR will fail to build because Does anyone who uses Eclipse have a formatter configuration that agrees with whatever Checkstyle spec is in use? |
|
the imports have to be alphabetical. So |
| import static org.trellisldp.app.TrellisUtils.getRDFConnection; | ||
| import static org.trellisldp.app.TrellisUtils.getWebacConfiguration; | ||
|
|
||
| import javax.jms.JMSException; |
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.
This should follow the import io.... section
|
Thanks, guys. |
|
The only issue here is that the |
|
Oh, shoot, you're right, and what's more, I think I did that. Let me do a little quick juggling and see if I can keep this PR simple, and yes, I'll try to use some fields and an init for this. That sounds good. The next commit might be a little while coming because the storm is getting worse here and I might want to get myself home before digging into this. |
|
Looks like the JDK10 Travis build failed for unrelated reasons (couldn't download the JDK). |
|
Don't worry about the JDK 10 build -- I figured that the download URL would change today. I'll fix that separately. |
|
The JDK 10 download issue has been resolved: 4ceeb23 |
|
Better? |
|
|
||
| private MementoService mementoService; | ||
|
|
||
| private TriplestoreResourceService resourceService; |
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.
Presumably, a subclass would not use this field? In other words, doesn't this add a hard dependency on the Triplestore implementation?
|
Arg! Fixed. My excuse is that I just got home from the snow. |
acoburn
left a comment
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.
I think the return types should be made more generic.
| return new TrellisCache<>(cache); | ||
| } | ||
|
|
||
| protected JenaIOService buildIoService(final NamespaceService namespaceService, |
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.
JenaIOService => IOService.
| return new JenaIOService(namespaceService, profileCache, TrellisUtils.getAssetConfiguration(config)); | ||
| } | ||
|
|
||
| protected FileBinaryService buildBinaryService(final IdentifierService idService) { |
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.
FileBinaryService => BinaryService
| config.getBinaryHierarchyLength()); | ||
| } | ||
|
|
||
| protected NamespacesJsonContext buildNamespaceService() { |
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.
NamespacesJsonContext => NamespaceService
| return new NamespacesJsonContext(config.getNamespaces()); | ||
| } | ||
|
|
||
| protected FileMementoService buildMementoService() { |
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.
FileMementoService => MementoService
| return new FileMementoService(config.getMementos()); | ||
| } | ||
|
|
||
| protected UUIDGenerator buildIdService() { |
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.
UUIDGenerator => IdentifierService
|
Arg. Sorry, doing too much at once. |
Factoring apart component builds for easier overriding
This commit introduces
protectedmethods for most of the parts of a running Trellis instance, in order to make subclassingTrellisApplicationless filled with cut-and-paste.