JCRVLT-336 - adding support for configuring installationScope for FSP…#43
JCRVLT-336 - adding support for configuring installationScope for FSP…#43DominikSuess wants to merge 3 commits into
Conversation
| * @param scope to set a corresponding workspacefilter | ||
| * @throws IOException If an I/O error occurs. | ||
| */ | ||
| public FSPackageRegistry(@Nonnull File homeDir, String scope) throws IOException { |
There was a problem hiding this comment.
why not use the InstallationScope class ?
| */ | ||
| package org.apache.jackrabbit.vault.packaging.registry.impl; | ||
|
|
||
| public final class InstallationScope { |
There was a problem hiding this comment.
wouldn't a enum be better ?
There was a problem hiding this comment.
@tripodsan - actually I started with it but the problem is that there is no static access to the string values of an enum making this unusable for the configuration case - I'll switch that to a normal POJO with constants and getters/setters for a single value so I can use it in the internals to pass not string objects. Patched now
There was a problem hiding this comment.
InstallationScope.UNSCOPED.name() ?
There was a problem hiding this comment.
.name() is also not a constant expression (as it may be overridden) - getting corresponding errors.
|
|
||
| private File homeDir; | ||
|
|
||
| private String scope; |
There was a problem hiding this comment.
use InstallationScope class
There was a problem hiding this comment.
see comment above.. about to resolve.
|
|
||
| import java.util.Arrays; | ||
|
|
||
| public class InstallationScope { |
There was a problem hiding this comment.
@tripodsan - see above, there is no way to access the values of the enum as a String with a static expression which I need for the annotations at build time.
There was a problem hiding this comment.
well, I think that having the benefit of the enum throughout the code outweighs to use 3 strings in the config :-)
…of PackageInstallations (closes #43) git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/commons/filevault/trunk@1856863 13f79535-47bb-0310-9956-ffa450edef68
…ackageRegistry