站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.6 API 英文版文档

PortalCMSCacheLoader - JBOSS Portal 2.6 API 英文版文档


org.jboss.portal.cms.hibernate.state
Class PortalCMSCacheLoader

java.lang.Object
  extended byorg.jboss.portal.cms.hibernate.state.PortalCMSCacheLoader

public class PortalCMSCacheLoader
extends java.lang.Object


Field Summary
private  TreeCache cache
           
private static java.lang.String loadVersionNode
           
private static java.lang.String loadVersionNodeChildren
           
private static java.lang.String loadVersionNodes
           
private static java.lang.String loadVersionProp
           
private static java.lang.String loadVersionPropChildren
           
private static java.lang.String loadVersionProps
           
private static java.lang.String loadVersionRef
           
private static java.lang.String loadVersionRefs
           
private static java.lang.String loadVersionRefsChildren
           
private static java.lang.String loadWSPNode
           
private static java.lang.String loadWSPNodeChildren
           
private static java.lang.String loadWSPNodes
           
private static java.lang.String loadWSPProp
           
private static java.lang.String loadWSPPropChildren
           
private static java.lang.String loadWSPProps
           
private static java.lang.String loadWSPRef
           
private static java.lang.String loadWSPRefs
           
private static java.lang.String loadWSPRefsChildren
           
private static org.apache.log4j.Logger log
          Logger instance
private static java.util.Map nodeNames
          map of propertyId-nodeName map
static java.lang.String VERSION_NODE_NODE
           
static java.lang.String VERSION_PROP_NODE
           
static java.lang.String VERSION_REF_NODE
           
static java.lang.String WSP_NODE_NODE
           
static java.lang.String WSP_PROP_NODE
           
static java.lang.String WSP_REF_NODE
           
 
Constructor Summary
PortalCMSCacheLoader()
           
 
Method Summary
 void commit(java.lang.Object tx)
           
 void create()
           
private  java.lang.Object delete(java.lang.String loadQuery, java.lang.String id)
           
 void destroy()
           
 boolean exists(Fqn fqn)
           
 java.util.Map get(Fqn fqn)
           
 java.util.Set getChildrenNames(Fqn fqn)
           
 byte[] loadEntireState()
           
private  java.lang.Object loadManagedNode(java.lang.String query, java.lang.String id)
           
private  java.lang.Object loadNode(java.lang.String query, java.lang.String id)
           
private static java.lang.String lookupNodeId(java.lang.String nodeName)
           
static java.lang.String parseNodeName(java.lang.String id)
           
 void prepare(java.lang.Object tx, java.util.List modifications, boolean one_phase)
           
 void put(Fqn fqn, java.util.Map attributes)
           
 java.lang.Object put(Fqn fqn, java.lang.Object key, java.lang.Object value)
          semantically, if the fqn node does not exist, the entire node needs to be created..
 void put(java.util.List modifications)
           
 void remove(Fqn fqn)
           
 java.lang.Object remove(Fqn fqn, java.lang.Object key)
           
 void removeData(Fqn fqn)
           
 void rollback(java.lang.Object tx)
           
private  void save(java.lang.Object object)
           
private  java.lang.Object saveVersionNodeNodeEntry(VersionNode versionNode)
           
private  java.lang.Object saveVersionPropNodeEntry(VersionProp versionProp)
           
private  java.lang.Object saveVersionRefNodeEntry(VersionRefs versionRef)
           
private  java.lang.Object saveWSPNodeNodeEntry(WSPNode wspNode)
           
private  java.lang.Object saveWSPPropNodeEntry(WSPProp wspProp)
           
private  java.lang.Object saveWSPRefNodeEntry(WSPRefs wspRef)
           
 void setCache(TreeCache cache)
           
 void setConfig(java.util.Properties properties)
           
 void start()
           
 void stop()
           
 void storeEntireState(byte[] arg0)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static org.apache.log4j.Logger log
Logger instance


loadWSPProps

private static final java.lang.String loadWSPProps
See Also:
Constant Field Values

loadWSPPropChildren

private static final java.lang.String loadWSPPropChildren
See Also:
Constant Field Values

loadWSPProp

private static final java.lang.String loadWSPProp
See Also:
Constant Field Values

loadVersionProps

private static final java.lang.String loadVersionProps
See Also:
Constant Field Values

loadVersionPropChildren

private static final java.lang.String loadVersionPropChildren
See Also:
Constant Field Values

loadVersionProp

private static final java.lang.String loadVersionProp
See Also:
Constant Field Values

loadWSPNodes

private static final java.lang.String loadWSPNodes
See Also:
Constant Field Values

loadWSPNodeChildren

private static final java.lang.String loadWSPNodeChildren
See Also:
Constant Field Values

loadWSPNode

private static final java.lang.String loadWSPNode
See Also:
Constant Field Values

loadVersionNodes

private static final java.lang.String loadVersionNodes
See Also:
Constant Field Values

loadVersionNodeChildren

private static final java.lang.String loadVersionNodeChildren
See Also:
Constant Field Values

loadVersionNode

private static final java.lang.String loadVersionNode
See Also:
Constant Field Values

loadWSPRefs

private static final java.lang.String loadWSPRefs
See Also:
Constant Field Values

loadWSPRefsChildren

private static final java.lang.String loadWSPRefsChildren
See Also:
Constant Field Values

loadWSPRef

private static final java.lang.String loadWSPRef
See Also:
Constant Field Values

loadVersionRefs

private static final java.lang.String loadVersionRefs
See Also:
Constant Field Values

loadVersionRefsChildren

private static final java.lang.String loadVersionRefsChildren
See Also:
Constant Field Values

loadVersionRef

private static final java.lang.String loadVersionRef
See Also:
Constant Field Values

WSP_PROP_NODE

public static final java.lang.String WSP_PROP_NODE
See Also:
Constant Field Values

VERSION_PROP_NODE

public static final java.lang.String VERSION_PROP_NODE
See Also:
Constant Field Values

WSP_NODE_NODE

public static final java.lang.String WSP_NODE_NODE
See Also:
Constant Field Values

VERSION_NODE_NODE

public static final java.lang.String VERSION_NODE_NODE
See Also:
Constant Field Values

WSP_REF_NODE

public static final java.lang.String WSP_REF_NODE
See Also:
Constant Field Values

VERSION_REF_NODE

public static final java.lang.String VERSION_REF_NODE
See Also:
Constant Field Values

nodeNames

private static java.util.Map nodeNames
map of propertyId-nodeName map


cache

private TreeCache cache
Constructor Detail

PortalCMSCacheLoader

public PortalCMSCacheLoader()
Method Detail

setConfig

public void setConfig(java.util.Properties properties)

setCache

public void setCache(TreeCache cache)

getChildrenNames

public java.util.Set getChildrenNames(Fqn fqn)
                               throws java.lang.Exception
Throws:
java.lang.Exception

exists

public boolean exists(Fqn fqn)
               throws java.lang.Exception
Throws:
java.lang.Exception

get

public java.util.Map get(Fqn fqn)
                  throws java.lang.Exception
Throws:
java.lang.Exception

put

public java.lang.Object put(Fqn fqn,
                            java.lang.Object key,
                            java.lang.Object value)
                     throws java.lang.Exception
semantically, if the fqn node does not exist, the entire node needs to be created.. In this cacheLoader's case, the node not existing in the database is not an option. that scenario never happens

returns the oldValue if its found or a new value is created

Throws:
java.lang.Exception

put

public void put(Fqn fqn,
                java.util.Map attributes)
         throws java.lang.Exception
Throws:
java.lang.Exception

put

public void put(java.util.List modifications)
         throws java.lang.Exception
Throws:
java.lang.Exception

remove

public java.lang.Object remove(Fqn fqn,
                               java.lang.Object key)
                        throws java.lang.Exception
Throws:
java.lang.Exception

remove

public void remove(Fqn fqn)
            throws java.lang.Exception
Throws:
java.lang.Exception

removeData

public void removeData(Fqn fqn)
                throws java.lang.Exception
Throws:
java.lang.Exception

prepare

public void prepare(java.lang.Object tx,
                    java.util.List modifications,
                    boolean one_phase)
             throws java.lang.Exception
Throws:
java.lang.Exception

commit

public void commit(java.lang.Object tx)
            throws java.lang.Exception
Throws:
java.lang.Exception

rollback

public void rollback(java.lang.Object tx)

loadEntireState

public byte[] loadEntireState()
                       throws java.lang.Exception
Throws:
java.lang.Exception

storeEntireState

public void storeEntireState(byte[] arg0)
                      throws java.lang.Exception
Throws:
java.lang.Exception

create

public void create()
            throws java.lang.Exception
Throws:
java.lang.Exception

start

public void start()
           throws java.lang.Exception
Throws:
java.lang.Exception

stop

public void stop()

destroy

public void destroy()

saveWSPPropNodeEntry

private java.lang.Object saveWSPPropNodeEntry(WSPProp wspProp)
                                       throws java.lang.Exception
Throws:
java.lang.Exception

saveVersionPropNodeEntry

private java.lang.Object saveVersionPropNodeEntry(VersionProp versionProp)
                                           throws java.lang.Exception
Throws:
java.lang.Exception

saveWSPNodeNodeEntry

private java.lang.Object saveWSPNodeNodeEntry(WSPNode wspNode)
                                       throws java.lang.Exception
Throws:
java.lang.Exception

saveVersionNodeNodeEntry

private java.lang.Object saveVersionNodeNodeEntry(VersionNode versionNode)
                                           throws java.lang.Exception
Throws:
java.lang.Exception

saveWSPRefNodeEntry

private java.lang.Object saveWSPRefNodeEntry(WSPRefs wspRef)
                                      throws java.lang.Exception
Throws:
java.lang.Exception

saveVersionRefNodeEntry

private java.lang.Object saveVersionRefNodeEntry(VersionRefs versionRef)
                                          throws java.lang.Exception
Throws:
java.lang.Exception

loadNode

private java.lang.Object loadNode(java.lang.String query,
                                  java.lang.String id)
                           throws java.lang.Exception
Throws:
java.lang.Exception

loadManagedNode

private java.lang.Object loadManagedNode(java.lang.String query,
                                         java.lang.String id)
                                  throws java.lang.Exception
Throws:
java.lang.Exception

save

private void save(java.lang.Object object)
           throws java.lang.Exception
Throws:
java.lang.Exception

delete

private java.lang.Object delete(java.lang.String loadQuery,
                                java.lang.String id)
                         throws java.lang.Exception
Throws:
java.lang.Exception

parseNodeName

public static java.lang.String parseNodeName(java.lang.String id)

lookupNodeId

private static java.lang.String lookupNodeId(java.lang.String nodeName)