/** * Creates a new MappingRuntimeException * * @param message the error message **/ public MappingRuntimeException(String message, Object[] args) { super(Messages.format(message, args)); } // -- MappingRuntimeException
/** * @see org.castor.xml.InternalContext#getProperty(java.lang.String) */ public Object getProperty(final String propertyName) { return _configuration.getObject(propertyName); }
/** * @see org.castor.xml.InternalContext#setUseIntrospector(java.lang.Boolean) */ public void setUseIntrospector(final Boolean useIntrospector) { _configuration.put(XMLConfiguration.USE_INTROSPECTION, useIntrospector); }
/** * Decode given string into a decoded byte array. * * @param str Base64 String to be decoded. * @return All decoded octets as byte array. */ public static byte[] decode(final String str) { Base64Decoder dec = new Base64Decoder(); dec.translate(str); return dec.getByteArray(); }
/** * Creates a new MappingRuntimeException * * @param message the error message **/ public MappingRuntimeException(String message) { super(Messages.message(message)); } // -- MappingRuntimeException
/** * Construct properties with given parent. Application and domain class loaders will be * initialized to the ones of the parent. * * @param parent Parent properties. */ protected AbstractProperties(final AbstractProperties parent) { _applicationClassLoader = parent.getApplicationClassLoader(); _domainClassLoader = parent.getDomainClassLoader(); _parent = parent; }
/** * Encode given byte array into a encoded character array. * * @param bytes The byte array to be encoded. * @return Base64 encoded characters as an array. */ public static char[] encode(final byte[] bytes) { Base64Encoder enc = new Base64Encoder(); enc.translate(bytes); return enc.getCharArray(); }
@Override public Boolean getBooleanProperty(final String propertyName) { return _properties.getBoolean(propertyName); }
/** * Construct a configuration with given parent. Application and domain class loaders will be * initialized to the ones of the parent. * * @param parent Parent configuration. */ protected Configuration(final Configuration parent) { _applicationClassLoader = parent.getApplicationClassLoader(); _domainClassLoader = parent.getDomainClassLoader(); _parent = parent; }
/** * @see org.castor.xml.InternalContext#getLoadPackageMapping() */ public Boolean getLoadPackageMapping() { return _configuration.getBoolean(XMLConfiguration.LOAD_PACKAGE_MAPPING); }
/** * Construct properties with given parent. Application and domain class loaders will be * initialized to the ones of the parent. <br/> * Note: This constructor is not intended for public use. Use one of the newInstance() methods * instead. * * @param parent Parent properties. */ public CastorProperties(final AbstractProperties parent) { super(parent); loadUserProperties(FILENAME); }
/** * {@inheritDoc} * * @see java.util.Collection#iterator() */ public Iterator iterator() { return new IdentityIterator(); }
@Override public Object getProperty(final String propertyName) { return _properties.getObject(propertyName); }
/** * Searches for the property with the specified key in this property map. If the key is not found * in this property map, the parent property map, and its parents, recursively, are then checked. * <br/> * If the key maps to any object value, it will be returned as is. If the property is not found, * <code>null</code> will be returned. * * @param key Property key. * @return Object in this property map with the specified key value. */ public final Object getObject(final String key) { return get(key); }
/** * Creates new instance of {@link StaxStreamHandler} class. * * @param xmlStreamWriter the instance of {@link XMLStreamWriter} to use * * @throws IllegalArgumentException if xmlStreamWriter is null */ public StaxStreamHandler(XMLStreamWriter xmlStreamWriter) { Assert.paramNotNull(xmlStreamWriter, "xmlStreamWriter"); this.xmlStreamWriter = xmlStreamWriter; }
/** * Format the named message using two argument and return the full message text. * * @param message The message name * @param arg1 The first argument * @param arg2 The second argument * @return The full message text */ public static String format(final String message, final Object arg1, final Object arg2) { return format(message, new Object[] {arg1, arg2}); }
@Override public Boolean getLoadPackageMapping() { return _properties.getBoolean(XMLProperties.LOAD_PACKAGE_MAPPING); }
/** * @see org.castor.xml.InternalContext#setProperty(java.lang.String, java.lang.Object) */ public void setProperty(final String propertyName, final Object value) { _configuration.put(propertyName, value); }
/** * Creates a new MappingRuntimeException * * @param exception the Exception which caused this Exception. * @param message the error message **/ public MappingRuntimeException(Throwable exception, String message) { super(Messages.format("mapping.nested", message)); _exception = exception; } // -- MappingRuntimeException
/** * Format the named message using a single argument and return the full message text. * * @param message The message name * @param arg1 The first argument * @return The full message text */ public static String format(final String message, final Object arg1) { return format(message, new Object[] {arg1}); }