Package org.wymiwyg.commons.util

Examples of org.wymiwyg.commons.util.LanguageUnavailableException


          String[] availableLanguages = new String[availableLiterals.length];
          for (int i = 0; i < availableLiterals.length; i++) {
            availableLanguages[i] = availableLiterals[i]
                .getLanguage();
          }
          throw new LanguageUnavailableException(
              "language not available, available version: "
                  + availableLiterals, availableLanguages);
        //} else {
          //return availableLiterals;
          //return model.createLiteral("");
View Full Code Here


      if (languageSet.contains(acceptLanguages.nextAcceptLanguageHeader()
          .getLocaleRange().getLocale().getLanguage())) {
        return;
      }
    }
    LanguageUnavailableException langEx = new LanguageUnavailableException(
        "Topic does not support language", (String[]) languageSet
            .toArray(new String[languageSet.size()]));
    throw new LanguageUnavailableHandlerException(langEx);

  }
View Full Code Here

                                                new UnavailableLocalisationHandler() {

                                                    public Literal[] getReplacement(
                                                            Literal[] availableLiterals)
                                                            throws LanguageUnavailableException {
                                                      throw new LanguageUnavailableException();
                                                       // log
                                                       //         .warn("unavailable lang-version");
                                                       // return availableLiterals;
                                                    }
View Full Code Here

      }
      if (languageSet.contains(acceptedLocale.getLanguage())) {
        return;
      }
    }
    LanguageUnavailableException langEx = new LanguageUnavailableException(
        "Topic does not support language", (String[]) languageSet
            .toArray(new String[languageSet.size()]));
    throw new LanguageUnavailableHandlerException(langEx);

  }
View Full Code Here

          HttpResource resource = resources[i];
          availableLanguagesStrings[i] = resource.getLocale()
              .getLanguage();
        }
        throw new LanguageUnavailableHandlerException(
            new LanguageUnavailableException(
                "document variant not found",
                availableLanguagesStrings));
      }
      response.setHeader(HeaderName.CONTENT_LANGUAGE, locale.toString());
    }
View Full Code Here

TOP

Related Classes of org.wymiwyg.commons.util.LanguageUnavailableException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.