001package org.andromda.cartridges.jsf2.metafacades;
002
003import org.andromda.cartridges.jsf2.JSFGlobals;
004
005/**
006 * MetafacadeLogic implementation for org.andromda.cartridges.jsf2.metafacades.JSFBackendService.
007 *
008 * @see org.andromda.cartridges.jsf2.metafacades.JSFBackendService
009 */
010public class JSFBackendServiceLogicImpl
011    extends JSFBackendServiceLogic
012{
013    private static final long serialVersionUID = 34L;
014    /**
015     * @param metaObject
016     * @param context
017     */
018    public JSFBackendServiceLogicImpl(
019        Object metaObject,
020        String context)
021    {
022        super(metaObject, context);
023    }
024
025    /**
026     * @return accessorImplementation
027     * @see org.andromda.cartridges.jsf2.metafacades.JSFBackendService#getAccessorImplementation()
028     */
029    protected String handleGetAccessorImplementation()
030    {
031        String accessorImplementation = String.valueOf(getConfiguredProperty(JSFGlobals.SERVICE_ACCESSOR_PATTERN));
032        return accessorImplementation.replaceAll("\\{0\\}",
033            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(getConfiguredProperty(JSFGlobals.SERVICE_PACKAGE_NAME_PATTERN));
042        return packageName.replaceAll(
043            "\\{0\\}",
044            super.getPackageName()) + "." + this.getName();
045    }
046}