001 /*
002 * JBoss DNA (http://www.jboss.org/dna)
003 * See the COPYRIGHT.txt file distributed with this work for information
004 * regarding copyright ownership. Some portions may be licensed
005 * to Red Hat, Inc. under one or more contributor license agreements.
006 * See the AUTHORS.txt file in the distribution for a full listing of
007 * individual contributors.
008 *
009 * JBoss DNA is free software. Unless otherwise indicated, all code in JBoss DNA
010 * is licensed to you under the terms of the GNU Lesser General Public License as
011 * published by the Free Software Foundation; either version 2.1 of
012 * the License, or (at your option) any later version.
013 *
014 * JBoss DNA is distributed in the hope that it will be useful,
015 * but WITHOUT ANY WARRANTY; without even the implied warranty of
016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
017 * Lesser General Public License for more details.
018 *
019 * You should have received a copy of the GNU Lesser General Public
020 * License along with this software; if not, write to the Free
021 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
022 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
023 */
024 package org.jboss.dna.repository;
025
026 import java.util.Locale;
027 import java.util.Set;
028 import org.jboss.dna.common.i18n.I18n;
029
030 /**
031 * @author Randall Hauch
032 * @author John Verhaeg
033 */
034 public final class RepositoryI18n {
035
036 // Configuration
037 public static I18n errorCreatingInstanceOfClass;
038 public static I18n errorCreatingInstanceOfClassUsingClassLoaders;
039 public static I18n errorSettingJavaBeanPropertyOnInstanceOfClass;
040 public static I18n pathExpressionIsInvalidOnSequencer;
041
042 // Services and Repository
043 public static I18n invalidStateString;
044 public static I18n serviceShutdowAndMayNotBeStarted;
045 public static I18n serviceShutdowAndMayNotBePaused;
046 public static I18n serviceNotShutdowAndMayNotBeTerminated;
047 public static I18n unableToFindRepositoryInJndi;
048 public static I18n unableToRegisterRepositoryInJndi;
049 public static I18n unableToUnregisterRepositoryInJndi;
050 public static I18n unableToRemoveRepository;
051 public static I18n unableToFindRepositoryWithName;
052 public static I18n errorProcessingEvents;
053 public static I18n errorFindingPropertyNameInPropertyAddedEvent;
054 public static I18n errorFindingPropertyNameInPropertyChangedEvent;
055 public static I18n errorFindingPropertyNameInPropertyRemovedEvent;
056
057 // Rules
058 public static I18n unableToObtainJsr94RuleAdministrator;
059 public static I18n errorUsingJsr94RuleAdministrator;
060 public static I18n unableToObtainJsr94ServiceProvider;
061 public static I18n errorAddingOrUpdatingRuleSet;
062 public static I18n errorRollingBackRuleSetAfterUpdateFailed;
063 public static I18n errorReadingRulesAndProperties;
064 public static I18n errorDeregisteringRuleSetBeforeUpdatingIt;
065 public static I18n errorRecreatingRuleSet;
066 public static I18n errorRemovingRuleSet;
067 public static I18n errorRemovingRuleSetUponShutdown;
068 public static I18n unableToFindRuleSet;
069 public static I18n errorExecutingRuleSetWithGlobalsAndFacts;
070 public static I18n unableToBuildRuleSetRegularExpressionPattern;
071
072 public static I18n errorObtainingSessionToRepositoryWorkspace;
073 public static I18n errorWritingProblemsOnRuleSet;
074
075 public static I18n federationServiceName;
076 public static I18n observationServiceName;
077 public static I18n ruleServiceName;
078
079 // Sequencing
080 public static I18n sequencingServiceName;
081 public static I18n unableToChangeExecutionContextWhileRunning;
082 public static I18n unableToStartSequencingServiceWithoutExecutionContext;
083 public static I18n errorWhileSequencingNode;
084 public static I18n errorInRepositoryWhileSequencingNode;
085 public static I18n errorFindingSequencersToRunAgainstNode;
086 public static I18n errorInRepositoryWhileFindingSequencersToRunAgainstNode;
087 public static I18n executionContextHasBeenClosed;
088 public static I18n unableToFindPropertyForSequencing;
089
090 // Properties
091 public static I18n errorReadingPropertiesFromContainerNode;
092 public static I18n requiredPropertyOnNodeWasExpectedToBeStringValue;
093 public static I18n optionalPropertyOnNodeWasExpectedToBeStringValue;
094 public static I18n requiredPropertyOnNodeWasExpectedToBeStringArrayValue;
095 public static I18n optionalPropertyOnNodeWasExpectedToBeStringArrayValue;
096 public static I18n requiredPropertyOnNodeCouldNotBeRead;
097 public static I18n optionalPropertyOnNodeCouldNotBeRead;
098 public static I18n requiredPropertyIsMissingFromNode;
099 public static I18n errorGettingRequiredPropertyFromNode;
100 public static I18n errorGettingOptionalPropertyFromNode;
101 public static I18n errorClosingBinaryStreamForPropertyFromNode;
102 public static I18n requiredNodeDoesNotExistRelativeToNode;
103 public static I18n errorGettingNodeRelativeToNode;
104 public static I18n unknownPropertyValueType;
105
106 // Path expressions
107 public static I18n pathExpressionIsInvalid;
108 public static I18n pathExpressionMayNotBeBlank;
109 public static I18n pathExpressionHasInvalidSelect;
110 public static I18n pathExpressionHasInvalidMatch;
111
112 // Observation
113 public static I18n errorUnregisteringWorkspaceListenerWhileShuttingDownObservationService;
114
115 // General
116 public static I18n invalidRepositoryNodePath;
117 public static I18n unableToLoadClass;
118 public static I18n unableToLoadClassUsingClasspath;
119 public static I18n unableToInstantiateClassUsingClasspath;
120 public static I18n unableToAccessClassUsingClasspath;
121
122 // Repository
123 public static I18n errorStartingRepositoryService;
124
125 // Engine
126 public static I18n engineIsNotRunning;
127 public static I18n errorsPreventStarting;
128
129 static {
130 try {
131 I18n.initialize(RepositoryI18n.class);
132 } catch (final Exception err) {
133 System.err.println(err);
134 }
135 }
136
137 public static Set<Locale> getLocalizationProblemLocales() {
138 return I18n.getLocalizationProblemLocales(RepositoryI18n.class);
139 }
140
141 public static Set<String> getLocalizationProblems() {
142 return I18n.getLocalizationProblems(RepositoryI18n.class);
143 }
144
145 public static Set<String> getLocalizationProblems( Locale locale ) {
146 return I18n.getLocalizationProblems(RepositoryI18n.class, locale);
147 }
148 }