001package org.andromda.cartridges.bpm4struts.metafacades;
002
003import org.andromda.cartridges.bpm4struts.Bpm4StrutsGlobals;
004
005/**
006 * MetafacadeLogic implementation for org.andromda.cartridges.bpm4struts.metafacades.StrutsBackendService.
007 *
008 * @see org.andromda.cartridges.bpm4struts.metafacades.StrutsBackendService
009 */
010public class StrutsBackendServiceLogicImpl
011    extends StrutsBackendServiceLogic
012{
013    private static final long serialVersionUID = 34L;
014    /**
015     * @param metaObject
016     * @param context
017     */
018    public StrutsBackendServiceLogicImpl(
019        Object metaObject,
020        String context)
021    {
022        super(metaObject, context);
023    }
024
025    /**
026     * @return Bpm4StrutsGlobals.SERVICE_ACCESSOR_PATTERN) replace getName()
027     * @see org.andromda.cartridges.bpm4struts.metafacades.StrutsBackendService#getAccessorImplementation()
028     */
029    protected String handleGetAccessorImplementation()
030    {
031        String accessorImplementation = String.valueOf(
032            getConfiguredProperty(Bpm4StrutsGlobals.SERVICE_ACCESSOR_PATTERN));
033        return accessorImplementation.replaceAll("\\{0\\}", getPackageName()).replaceAll("\\{1\\}", getName());
034    }
035
036    /**
037     * @see org.andromda.metafacades.uml.ModelElementFacade#getFullyQualifiedName()
038     */
039    public String getFullyQualifiedName()
040    {
041        String packageName = String.valueOf(
042            getConfiguredProperty(Bpm4StrutsGlobals.SERVICE_PACKAGE_NAME_PATTERN));
043        return packageName.replaceAll("\\{0\\}", super.getPackageName()) + '.' + this.getName();
044    }
045}