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.graph;
025    
026    import java.util.Locale;
027    import java.util.Set;
028    import org.jboss.dna.common.CommonI18n;
029    import org.jboss.dna.common.i18n.I18n;
030    
031    /**
032     * @author Randall Hauch
033     * @author John Verhaeg
034     */
035    public final class GraphI18n {
036    
037        public static I18n closedConnectionMayNotBeUsed;
038        public static I18n errorConvertingIo;
039        public static I18n errorConvertingType;
040        public static I18n errorReadingPropertyValueBytes;
041        public static I18n invalidIndexInSegmentName;
042        public static I18n invalidQualifiedNameString;
043        public static I18n maximumPoolSizeMayNotBeSmallerThanCorePoolSize;
044        public static I18n missingEndBracketInSegmentName;
045        public static I18n noNamespaceRegisteredForPrefix;
046        public static I18n pathAncestorDegreeIsInvalid;
047        public static I18n pathCannotBeNormalized;
048        public static I18n pathIsAlreadyAbsolute;
049        public static I18n pathIsNotAbsolute;
050        public static I18n pathIsNotRelative;
051        public static I18n repositoryConnectionPoolIsNotRunning;
052        public static I18n unableToCreateSubpathBeginIndexGreaterThanOrEqualToEndingIndex;
053        public static I18n unableToCreateSubpathBeginIndexGreaterThanOrEqualToSize;
054        public static I18n unableToCreateValue;
055        public static I18n unableToDiscoverPropertyTypeForNullValue;
056        public static I18n unableToObtainValidRepositoryAfterAttempts;
057        public static I18n validPathMayNotContainEmptySegment;
058        public static I18n valueJavaTypeNotCompatibleWithPropertyType;
059        public static I18n pathExpressionMayNotBeBlank;
060        public static I18n pathExpressionIsInvalid;
061        public static I18n pathExpressionHasInvalidSelect;
062        public static I18n pathExpressionHasInvalidMatch;
063        public static I18n messageDigestNotFound;
064        public static I18n unableToAccessResourceFileFromClassLoader;
065        public static I18n pathNotFoundExceptionLowestExistingLocationFound;
066    
067        public static I18n executingRequest;
068        public static I18n executedRequest;
069        public static I18n closingRequestProcessor;
070        public static I18n closedRequestProcessor;
071        public static I18n multipleErrorsWhileExecutingRequests;
072        public static I18n unsupportedRequestType;
073        public static I18n unableToAddMoreRequestsToAlreadyExecutedBatch;
074        public static I18n unableToCreateReferenceToNodeWithoutUuid;
075        public static I18n unableToCopyToLocationWithoutAPath;
076        public static I18n unableToCopyToTheRoot;
077        public static I18n actualLocationIsNotSameAsInputLocation;
078        public static I18n actualLocationIsNotChildOfInputLocation;
079        public static I18n actualLocationMustHavePath;
080        public static I18n actualNewLocationIsNotSameAsInputLocation;
081        public static I18n actualNewLocationMustHavePath;
082        public static I18n actualOldLocationIsNotSameAsInputLocation;
083        public static I18n actualOldLocationMustHavePath;
084        public static I18n actualNewLocationMustHaveSameParentAsOldLocation;
085        public static I18n actualNewLocationMustHaveSameNameAsRequest;
086    
087        public static I18n errorImportingContent;
088        public static I18n unableToFindRepositorySourceWithName;
089    
090        /* In-Memory Connector */
091        public static I18n inMemoryConnectorName;
092        public static I18n inMemoryNodeDoesNotExist;
093        public static I18n errorSerializingInMemoryCachePolicyInSource;
094        public static I18n inMemoryConnectorRequestsMustHavePathOrUuid;
095        public static I18n workspaceDoesNotExistInRepository;
096        public static I18n workspaceAlreadyExistsInRepository;
097    
098        static {
099            try {
100                I18n.initialize(GraphI18n.class);
101            } catch (final Exception err) {
102                System.err.println(err);
103            }
104        }
105    
106        public static Set<Locale> getLocalizationProblemLocales() {
107            return I18n.getLocalizationProblemLocales(CommonI18n.class);
108        }
109    
110        public static Set<String> getLocalizationProblems() {
111            return I18n.getLocalizationProblems(CommonI18n.class);
112        }
113    
114        public static Set<String> getLocalizationProblems( Locale locale ) {
115            return I18n.getLocalizationProblems(CommonI18n.class, locale);
116        }
117    }