spcp7.imagegallery.abstractionlayer.util
Class StandardUtils

java.lang.Object
  extended by spcp7.imagegallery.abstractionlayer.util.StandardUtils

public class StandardUtils
extends java.lang.Object

Utils which could be useful in every spcp7 imagegallery project or even for the whole spcp7.

Author:
Phillip Merensky

Constructor Summary
StandardUtils()
           
 
Method Summary
static
<A> A
deepCopy(A o)
          This method copies the given instance by value via bytestreams to a new instance.
static java.util.ResourceBundle determineResourceBundle(javax.faces.context.FacesContext fc)
          This method tries to get the user's locale from the faces context returns the appropriate bundle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardUtils

public StandardUtils()
Method Detail

deepCopy

public static <A> A deepCopy(A o)
This method copies the given instance by value via bytestreams to a new instance.

Type Parameters:
A - The type of the given object.
Parameters:
o - The given object must implement Serializable
Returns:
A fully detached new instance of the same object type as the given object.

determineResourceBundle

public static java.util.ResourceBundle determineResourceBundle(javax.faces.context.FacesContext fc)
This method tries to get the user's locale from the faces context returns the appropriate bundle. If no bunle can be retrieved locale "en_EN" will be used.

Parameters:
fc - the facesContext
Returns:
a context specific resource bundle or an en_EN resource bundle if no resource bundle could be determined from the context.


Copyright © 2008. All Rights Reserved.