Bert Leunis pushed to branch master at cms-community / hippo-repository

Commits:
5d129a53 by Bert Leunis at 2018-02-02T09:28:21+01:00
REPO-1860 prepare restore original commit message

- - - - -
acc94e2a by Mathijs den Burger at 2018-02-02T09:37:14+01:00
REPO-1860 Add StringCodecService and a module that provides it

The service populates a StringCodecFactory with dynamically loaded
StringCodec classes. Customers can register a more locale-specific
StringCodec class by adding more properties to
/hippo:configuration/hippo:modules/stringcodec/hippo:moduleconfig
(e.g. "encoding.display.de" for a German-specific encoder of display
names).

The StringCodecModuleConfig always registers a default identity codec
under the 'null' key, so the StringCodecServiceImpl can use the 
'null'
key to retrieve the codec for identity encoding.

Note: the original commit date of these changes was 20-10-2017. The
original commit message got lost during a reintegration, so these
changes merely restore the original commit messages.

- - - - -
62f06ec0 by Bert Leunis at 2018-02-02T09:45:16+01:00
REPO-1860 Reintegrate feature/REPO-1860

- - - - -


3 changed files:

- api/src/main/java/org/hippoecm/repository/api/StringCodecService.java
- 
modules/src/main/java/org/hippoecm/repository/stringcodec/StringCodecModule.java
- 
modules/src/test/java/org/hippoecm/repository/stringcodec/StringCodecModuleConfigTest.java


Changes:

=====================================
api/src/main/java/org/hippoecm/repository/api/StringCodecService.java
=====================================
--- a/api/src/main/java/org/hippoecm/repository/api/StringCodecService.java
+++ b/api/src/main/java/org/hippoecm/repository/api/StringCodecService.java
@@ -54,7 +54,7 @@ public interface StringCodecService {
      * Returns the string codec for a certain encoding that is best suited for 
the given locale.
      *
      * @param encoding the type of encoding
-     * @param locale the locale the string codec will be used for. Can be null.
+     * @param locale   the locale the string codec will be used for. Can be 
null.
      *
      * @return the best matching string codec, or the default string codec if 
no specific one could be found.
      */


=====================================
modules/src/main/java/org/hippoecm/repository/stringcodec/StringCodecModule.java
=====================================
--- 
a/modules/src/main/java/org/hippoecm/repository/stringcodec/StringCodecModule.java
+++ 
b/modules/src/main/java/org/hippoecm/repository/stringcodec/StringCodecModule.java
@@ -33,12 +33,12 @@ public class StringCodecModule extends 
AbstractReconfigurableDaemonModule {
     }
 
     @Override
-    protected void doConfigure(final Node node) throws RepositoryException {
+    protected void doConfigure(final Node node) {
         config.reconfigure(node);
     }
 
     @Override
-    protected void doInitialize(final Session session) throws 
RepositoryException {
+    protected void doInitialize(final Session session) {
         service = new StringCodecServiceImpl(config);
         HippoServiceRegistry.registerService(service, 
StringCodecService.class);
     }


=====================================
modules/src/test/java/org/hippoecm/repository/stringcodec/StringCodecModuleConfigTest.java
=====================================
--- 
a/modules/src/test/java/org/hippoecm/repository/stringcodec/StringCodecModuleConfigTest.java
+++ 
b/modules/src/test/java/org/hippoecm/repository/stringcodec/StringCodecModuleConfigTest.java
@@ -48,7 +48,7 @@ public class StringCodecModuleConfigTest {
     }
 
     @Test
-    public void emptyConfigHasDefaultCodec() throws RepositoryException {
+    public void emptyConfigHasDefaultCodec() {
         final StringCodecModuleConfig config = new StringCodecModuleConfig();
         final MockNode emptyNode = MockNode.root();
 



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-repository/compare/3472e690a21f374c414eab8eeef375b8f92e79d9...62f06ec0af7935bfbf96c78190ebb9800c7db2fd

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-repository/compare/3472e690a21f374c414eab8eeef375b8f92e79d9...62f06ec0af7935bfbf96c78190ebb9800c7db2fd
You're receiving this email because of your account on code.onehippo.org.
_______________________________________________
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn

Reply via email to