| java.lang.Object de.nava.informa.utils.InformaUtils
InformaUtils | final public class InformaUtils (Code) | | InformaUtils class contain helper methods for various channel operations.
|
copyChannelProperties | public static void copyChannelProperties(ChannelIF sourceChan, ChannelIF updChan)(Code) | | Copies all the top level properties from sourceChan into
this updChan . Convience method to update basic channel
properties (like title and description) in one call.
Important: Location and Format is unchanged by this operation.
TODO: Tricky. There is a bug here that has to be fixed. Channel Properties
which are actually pointers to other objects (e.g. Cloud) cannot be simply
copied because during channel and item parsing, we first parse the stream
into a basic (e.g. impl.basic.Cloud) object, which then gets subsequently copied
by this method into a persistent (e.g. impl.hibernate.Cloud) object.
I think the solution to this is to pass a ChannelBuilder into this method
which is used to create the right type of duplicates of the objects instead
of just copying the references. For now I will be skipping those. A similar
kind of problem probably exists when copying item properties.
|
copyItemProperties | public static void copyItemProperties(ItemIF src, ItemIF dest)(Code) | | Analogous function to copy all the properties of an item to another one.
Parameters: src - - Source ItemIF Parameters: dest - - Destination ItemIF |
|
|