From b409a37cbf81a121351c96aec4610b43c23b5dd2 Mon Sep 17 00:00:00 2001 From: Mehdi Houshmand Date: Wed, 4 Jul 2012 07:54:43 +0000 Subject: [PATCH] Addressed some of the comments made by VH re:Temp_URI_Unification merge git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1357140 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/apps/EnvironmentProfile.java | 5 ++++- .../org/apache/fop/apps/EnvironmentalProfileFactory.java | 5 ++++- src/java/org/apache/fop/apps/FOUserAgent.java | 7 ++++--- src/java/org/apache/fop/apps/FopFactory.java | 6 +++--- src/java/org/apache/fop/apps/FopFactoryBuilder.java | 2 +- src/java/org/apache/fop/apps/FopFactoryConfig.java | 3 ++- .../org/apache/fop/layoutmgr/inline/LineLayoutManager.java | 2 +- test/java/org/apache/fop/fotreetest/FOTreeTestCase.java | 5 ++--- 8 files changed, 21 insertions(+), 14 deletions(-) diff --git a/src/java/org/apache/fop/apps/EnvironmentProfile.java b/src/java/org/apache/fop/apps/EnvironmentProfile.java index c35219353..c964120e3 100644 --- a/src/java/org/apache/fop/apps/EnvironmentProfile.java +++ b/src/java/org/apache/fop/apps/EnvironmentProfile.java @@ -25,7 +25,10 @@ import org.apache.fop.apps.io.ResourceResolver; import org.apache.fop.fonts.FontManager; /** - * The environment profile represents the restrictions and allowances that FOP is + * The environment profile represents the system in which FOP is invoked. Some of FOPs services rely + * upon features within the system, as such, the client may want to restrict access to these + * services. This object allows clients to control those restrictions by implementing the interfaces + * that the environment profile holds. */ public interface EnvironmentProfile { diff --git a/src/java/org/apache/fop/apps/EnvironmentalProfileFactory.java b/src/java/org/apache/fop/apps/EnvironmentalProfileFactory.java index 374074b8a..9ba7632d2 100644 --- a/src/java/org/apache/fop/apps/EnvironmentalProfileFactory.java +++ b/src/java/org/apache/fop/apps/EnvironmentalProfileFactory.java @@ -84,7 +84,10 @@ public final class EnvironmentalProfileFactory { throw new IllegalArgumentException("Default base URI must not be null"); } if (resourceResolver == null) { - throw new IllegalArgumentException("URI Resolver must not be null"); + throw new IllegalArgumentException("ResourceResolver must not be null"); + } + if (fontManager == null) { + throw new IllegalArgumentException("The FontManager must not be null"); } this.defaultBaseURI = defaultBaseURI; this.resourceResolver = resourceResolver; diff --git a/src/java/org/apache/fop/apps/FOUserAgent.java b/src/java/org/apache/fop/apps/FOUserAgent.java index 488b62474..b4c69c6e3 100644 --- a/src/java/org/apache/fop/apps/FOUserAgent.java +++ b/src/java/org/apache/fop/apps/FOUserAgent.java @@ -786,13 +786,14 @@ public class FOUserAgent { return factory.getImageHandlerRegistry(); } - /** TODO: javadoc*/ + /** @return the color space cache */ public ColorSpaceCache getColorSpaceCache() { return factory.getColorSpaceCache(); } - public Map getHyphPatNames() { - return factory.getHyphPatNames(); + /** @see {@link FopFactory#getHyphenationPatternNames()} */ + public Map getHyphenationPatternNames() { + return factory.getHyphenationPatternNames(); } } diff --git a/src/java/org/apache/fop/apps/FopFactory.java b/src/java/org/apache/fop/apps/FopFactory.java index ec7266957..4508ea7fa 100644 --- a/src/java/org/apache/fop/apps/FopFactory.java +++ b/src/java/org/apache/fop/apps/FopFactory.java @@ -341,9 +341,9 @@ public final class FopFactory implements ImageContext { return config.getLayoutManagerMakerOverride(); } - - public Map getHyphPatNames() { - return config.getHyphPatNames(); + /** @return the hyphenation pattern names */ + public Map getHyphenationPatternNames() { + return config.getHyphenationPatternNames(); } /** diff --git a/src/java/org/apache/fop/apps/FopFactoryBuilder.java b/src/java/org/apache/fop/apps/FopFactoryBuilder.java index 44c44c119..6c3da57f3 100644 --- a/src/java/org/apache/fop/apps/FopFactoryBuilder.java +++ b/src/java/org/apache/fop/apps/FopFactoryBuilder.java @@ -452,7 +452,7 @@ public final class FopFactoryBuilder { return isComplexScript; } - public Map getHyphPatNames() { + public Map getHyphenationPatternNames() { return hyphPatNames; } } diff --git a/src/java/org/apache/fop/apps/FopFactoryConfig.java b/src/java/org/apache/fop/apps/FopFactoryConfig.java index 1ef958fae..2545eea5e 100644 --- a/src/java/org/apache/fop/apps/FopFactoryConfig.java +++ b/src/java/org/apache/fop/apps/FopFactoryConfig.java @@ -126,5 +126,6 @@ public interface FopFactoryConfig { boolean isComplexScriptFeaturesEnabled(); - Map getHyphPatNames(); + /** @see {@link FopFactory#getHyphenationPatternNames()} */ + Map getHyphenationPatternNames(); } diff --git a/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java b/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java index 56c534f90..5b8145432 100644 --- a/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java @@ -1399,7 +1399,7 @@ public class LineLayoutManager extends InlineStackingLayoutManager Hyphenation hyph = Hyphenator.hyphenate(hyphenationProperties.language.getString(), hyphenationProperties.country.getString(), getFObj().getUserAgent().getResourceResolver(), - getFObj().getUserAgent().getHyphPatNames(), + getFObj().getUserAgent().getHyphenationPatternNames(), sbChars.toString(), hyphenationProperties.hyphenationRemainCharacterCount.getValue(), hyphenationProperties.hyphenationPushCharacterCount.getValue()); diff --git a/test/java/org/apache/fop/fotreetest/FOTreeTestCase.java b/test/java/org/apache/fop/fotreetest/FOTreeTestCase.java index b03e35971..ab6411b3a 100644 --- a/test/java/org/apache/fop/fotreetest/FOTreeTestCase.java +++ b/test/java/org/apache/fop/fotreetest/FOTreeTestCase.java @@ -275,9 +275,8 @@ public class FOTreeTestCase { return delegate.isComplexScriptFeaturesEnabled(); } - public Map getHyphPatNames() { - return delegate.getHyphPatNames(); + public Map getHyphenationPatternNames() { + return delegate.getHyphenationPatternNames(); } } - } -- 2.39.5