001package org.andromda.cartridges.jbpm.metafacades;
002
003/**
004 * MetafacadeLogic implementation for org.andromda.cartridges.jbpm.metafacades.JBpmNode.
005 *
006 * @see org.andromda.cartridges.jbpm.metafacades.JBpmNode
007 */
008public class JBpmNodeLogicImpl
009    extends JBpmNodeLogic
010{
011    private static final long serialVersionUID = 34L;
012    /**
013     * @param metaObject
014     * @param context
015     */
016    public JBpmNodeLogicImpl (Object metaObject, String context)
017    {
018        super (metaObject, context);
019    }
020
021    /**
022     * @return !this.getTasks().isEmpty()
023     * @see org.andromda.cartridges.jbpm.metafacades.JBpmNode#isTaskNode()
024     */
025    protected boolean handleIsTaskNode()
026    {
027        return !this.getTasks().isEmpty();
028    }
029
030    /**
031     * @see org.andromda.cartridges.jbpm.metafacades.JBpmNodeLogic#handleGetSwimlane()
032     * @see org.andromda.cartridges.jbpm.metafacades.JBpmNode#getSwimlane()
033     */
034    protected Object handleGetSwimlane()
035    {
036        return this.getPartition();
037    }
038
039    //TODO Generation from UML2 Metafacade model does not put these methods in *Logic generated class.
040    // Implementation copied from UML14 generated version, to avoid compiler error on missing method implementation from abstract method.
041    /**
042     *
043     * @see org.andromda.cartridges.jbpm.metafacades.JBpmStateVertex#getNodeClassName()
044     */
045    @Override
046    public String getNodeClassName()
047    {
048        return this.getSuperJBpmEventState().getNodeClassName();
049    }
050
051    /**
052     *
053     * @see org.andromda.cartridges.jbpm.metafacades.JBpmStateVertex#getNodePackageName()
054     */
055    @Override
056    public String getNodePackageName()
057    {
058        return this.getSuperJBpmEventState().getNodePackageName();
059    }
060
061    /**
062     *
063     * @see org.andromda.cartridges.jbpm.metafacades.JBpmStateVertex#getProcessDefinition()
064     */
065    @Override
066    public JBpmProcessDefinition getProcessDefinition()
067    {
068        return this.getSuperJBpmEventState().getProcessDefinition();
069    }
070
071    /**
072     * <p>
073     * True if this element is part of a business process usecase.
074     * </p>
075     * @see org.andromda.cartridges.jbpm.metafacades.JBpmStateVertex#isContainedInBusinessProcess()
076     */
077    @Override
078    public boolean isContainedInBusinessProcess()
079    {
080        return this.getSuperJBpmEventState().isContainedInBusinessProcess();
081    }
082}