de.nava.informa.utils
Class InformaUtils
java.lang.Object
de.nava.informa.utils.InformaUtils
public final class InformaUtils
- extends Object
InformaUtils class contain helper methods for various channel operations.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InformaUtils
public InformaUtils()
copyChannelProperties
public static void copyChannelProperties(ChannelIF sourceChan,
ChannelIF updChan)
- 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)
- Analogous function to copy all the properties of an item to another one.
- Parameters:
src
- - Source ItemIFdest
- - Destination ItemIF
Copyright © 2002-2007 Niko Schmuck.
All Rights Reserved.