Template extension spring configuration support

- similar pattern to existing script bean extension support
 - new root model helper objects and custom methods can be added via spring configuration
Cleanup of script extension spring support
Fix to thread safety of configured script extension beans that use the Scopable interface

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5369 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2007-03-09 12:30:34 +00:00
parent e4e89f4db1
commit 9323a8cd7a
24 changed files with 363 additions and 151 deletions

View File

@@ -0,0 +1,54 @@
/*
* Copyright (C) 2005-2007 Alfresco Software Limited.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* As a special exception to the terms and conditions of version 2.0 of
* the GPL, you may redistribute this Program in connection with Free/Libre
* and Open Source Software ("FLOSS") applications as described in Alfresco's
* FLOSS exception. You should have recieved a copy of the text describing
* the FLOSS exception, and it is also available here:
* http://www.alfresco.com/legal/licensing"
*/
package org.alfresco.service.cmr.repository;
/**
* Interface to represent a server side template extension implementation
*
* @author Kevin Roast
*/
public interface TemplateExtensionImplementation
{
/**
* Returns the name of the template extension
*
* @return the name of the template extension
*/
String getExtensionName();
/**
* Set the template image resolver for this extension
*
* @param resolver TemplateImageResolver
*/
void setTemplateImageResolver(TemplateImageResolver resolver);
/**
* Get the template image resolver for this extension
*
* @return TemplateImageResolver
*/
TemplateImageResolver getTemplateImageResolver();
}

View File

@@ -25,6 +25,7 @@
package org.alfresco.service.cmr.repository;
import java.io.Writer;
import java.util.List;
import org.alfresco.service.Auditable;
import org.alfresco.service.PublicService;
@@ -111,4 +112,20 @@ public interface TemplateService
*/
@Auditable(warn = true, parameters = {"engine"})
public TemplateProcessor getTemplateProcessor(String engine);
/**
* Registers a template extension implementation with the Template service
*
* @param extension the template extension implementation
*/
@Auditable(parameters = {"extension"})
public void registerExtension(TemplateExtensionImplementation extension);
/**
* Returns a list of the Template Extension objects configured for this service
*
* @return list of the Template Extension objects configured for this service
*/
@Auditable(warn = true, recordReturnedObject = false)
public List<TemplateExtensionImplementation> getExtensions();
}