Example usage for java.util MissingResourceException getClassName

List of usage examples for java.util MissingResourceException getClassName

Introduction

In this page you can find the example usage for java.util MissingResourceException getClassName.

Prototype

public String getClassName() 

Source Link

Document

Gets parameter passed by constructor.

Usage

From source file:de.mendelson.comm.as2.server.AS2ServerProcessing.java

public AS2ServerProcessing(ClientServer clientserver, DirPollManager pollManager,
        CertificateManager certificateManager, Connection configConnection, Connection runtimeConnection) {
    //Load default resourcebundle
    try {//from  w w w  .jav a  2s. c o m
        this.rb = (MecResourceBundle) ResourceBundle
                .getBundle(ResourceBundleAS2ServerProcessing.class.getName());
    } //load up  resourcebundle
    catch (MissingResourceException e) {
        throw new RuntimeException("Oops..resource bundle " + e.getClassName() + " not found.");
    }
    this.filesystemview = new FileSystemViewProcessorServer(this.logger);
    this.clientserver = clientserver;
    this.configConnection = configConnection;
    this.runtimeConnection = runtimeConnection;
    this.pollManager = pollManager;
    this.certificateManager = certificateManager;
}

From source file:de.mendelson.comm.as2.message.AS2MessageCreation.java

public AS2MessageCreation(CertificateManager signatureCertManager, CertificateManager encryptionCertManager) {
    //Load resourcebundle
    try {/* ww w  .java2s  .co m*/
        this.rb = (MecResourceBundle) ResourceBundle.getBundle(ResourceBundleAS2MessagePacker.class.getName());
        this.rbMessage = (MecResourceBundle) ResourceBundle.getBundle(ResourceBundleAS2Message.class.getName());
    } //load up  resourcebundle
    catch (MissingResourceException e) {
        throw new RuntimeException("Oops..resource bundle " + e.getClassName() + " not found.");
    }
    this.signatureCertManager = signatureCertManager;
    this.encryptionCertManager = encryptionCertManager;
}

From source file:de.mendelson.comm.as2.send.MessageHttpUploader.java

/** Creates new message uploader instance
 * @param hostname Name of the host to connect to
 * @param username Name of the user that will connect to the remote ftp server
 * @param password password to connect to the ftp server
 *///w  ww  .jav a 2s  . c o  m
public MessageHttpUploader() throws Exception {
    //Load default resourcebundle
    try {
        this.rb = (MecResourceBundle) ResourceBundle.getBundle(ResourceBundleHttpUploader.class.getName());
    } //load up resourcebundle
    catch (MissingResourceException e) {
        throw new RuntimeException("Oops..resource bundle " + e.getClassName() + " not found.");
    }
}

From source file:de.mendelson.comm.as2.message.AS2MessageParser.java

public AS2MessageParser() {
    //Load resourcebundle
    try {//  w  w w.  j  av a2s . com
        this.rb = (MecResourceBundle) ResourceBundle.getBundle(ResourceBundleAS2MessageParser.class.getName());
        this.rbMessage = (MecResourceBundle) ResourceBundle.getBundle(ResourceBundleAS2Message.class.getName());
    } //load up  resourcebundle
    catch (MissingResourceException e) {
        throw new RuntimeException("Oops..resource bundle " + e.getClassName() + " not found.");
    }
}

From source file:org.mili.core.resource.ResourceUtilImpl.java

@Override
public String getString(Locale locale, String baseName, String key) {
    Validate.notNull(locale, "locale cannot be null!");
    Validate.notEmpty(baseName, "basename cannot be empty!");
    Validate.notEmpty(key, "key cannot be empty!");
    Map<String, String> bundle = getBundle(locale, baseName, key);
    try {//from w w w . j a va 2s.c o m
        String res = bundle.get(key);
        if (res == null) {
            throw new MissingResourceException("missing resource!", null, key);
        }
        return res;
    } catch (MissingResourceException e) {
        setUpMissingResourceHandler(locale, baseName, key);
        if (Boolean.getBoolean(PROP_LOGMISSINGRESOURCE)) {
            MissingResourceLogger.INSTANCE.log(locale, key);
        }
        if (Boolean.getBoolean(PROP_THROWEXCEPTIONONMISSINGRESOURCE)) {
            throw new MissingResourceException(
                    "Missing resource for locale ! " + getInfo(locale, baseName, key), e.getClassName(), key);
        } else {
            if (Boolean.getBoolean(PROP_LOGMISSINGRESOURCEASWARNING)) {
                log.warn("Missing resource for locale! ", getInfo(locale, baseName, key));
            }
            return createMissingResource(key);
        }
    }
}