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