/************************************************************************** * TraceableEntity * * $Workfile$ * $Revision: 1.108 $ * $Date: 2005/10/06 14:46:22 $ * * Copyright (C) 2001 CERN - European Organization for Nuclear Research * All rights reserved. **************************************************************************/ package com.c2kernel.entity; import com.c2kernel.common.AccessRightsException; import com.c2kernel.common.InvalidDataException; import com.c2kernel.common.InvalidTransitionException; import com.c2kernel.common.ObjectAlreadyExistsException; import com.c2kernel.common.ObjectNotFoundException; import com.c2kernel.common.PersistencyException; import com.c2kernel.common.SystemKey; import com.c2kernel.lookup.ItemPath; import com.c2kernel.utils.Logger; /************************************************************************** * * @author $Author: abranson $ $Date: 2005/10/06 14:46:22 $ * @version $Revision: 1.108 $ *
*                                ,.   '\'\    ,---.
*                            .  | \\  l\\l_ //    |
*        _              _       |  \\/ `/  `.|    |
*      /~\\   \        //~\     | Y |   |   ||  Y |
*      |  \\   \      //  |     |  \|   |   |\ /  |
*      [   ||        ||   ]     \   |  o|o  | >  /
*     ] Y  ||        ||  Y [     \___\_--_ /_/__/
*     |  \_|l,------.l|_/  |     /.-\(____) /--.\
*     |   >'          `<   |     `--(______)----'
*     \  (/~`--____--'~\)  /         u// u / \
*      `-_>-__________-<_-'          / \  / /|
*          /(_#(__)#_)\             ( .) / / ]
*          \___/__\___/              `.`' /   [
*           /__`--'__\                |`-'    |
*        /\(__,>-~~ __)               |       |_
*     /\//\\(  `--~~ )               _l       |-:.
*     '\/  <^\      /^>             |  `   (  <  \\
*          _\ >-__-< /_           ,-\  ,-~~->. \  `:._,/
*        (___\    /___)         (____/    (____)   `-'
*             Kovax            and, paradoxically, Kovax
* 
***************************************************************************/ public class TraceableEntity extends ItemPOA { private final org.omg.PortableServer.POA mPoa; private final ItemImplementation mItemImpl; /************************************************************************** * Constructor used by the Locator only **************************************************************************/ public TraceableEntity( ItemPath key, org.omg.PortableServer.POA poa ) { Logger.msg(5,"TraceableEntity::constructor() - SystemKey:" + key ); mPoa = poa; mItemImpl = new ItemImplementation(key); } /************************************************************************** * **************************************************************************/ @Override public org.omg.PortableServer.POA _default_POA() { if(mPoa != null) return mPoa; else return super._default_POA(); } /************************************************************************** * **************************************************************************/ @Override public SystemKey getSystemKey() { return mItemImpl.getSystemKey(); } /************************************************************************** * **************************************************************************/ @Override public void initialise( SystemKey agentId, String propString, String initWfString, String initCollsString ) throws AccessRightsException, InvalidDataException, PersistencyException { synchronized (this) { mItemImpl.initialise(agentId, propString, initWfString, initCollsString); } } /************************************************************************** * **************************************************************************/ //requestdata is xmlstring @Override public String requestAction( SystemKey agentId, String stepPath, int transitionID, String requestData ) throws AccessRightsException, InvalidTransitionException, ObjectNotFoundException, InvalidDataException, PersistencyException, ObjectAlreadyExistsException { synchronized (this) { return mItemImpl.requestAction(agentId, stepPath, transitionID, requestData); } } /************************************************************************** * **************************************************************************/ @Override public String queryLifeCycle( SystemKey agentId, boolean filter ) throws AccessRightsException, ObjectNotFoundException, PersistencyException { synchronized (this) { return mItemImpl.queryLifeCycle(agentId, filter); } } /************************************************************************** * The description for operation getData. * * @param path - the path to the object required * the suffix 'all' retrieves a listing of all keys on that level * * @return The result string in xml format * except 'all' which returns a comma sep list * * @exception ObjectNotFoundException * ************************************************************************/ @Override public String queryData(String path) throws AccessRightsException, ObjectNotFoundException, PersistencyException { synchronized (this) { return mItemImpl.queryData(path); } } }