mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fixed javadoc for PublicServiceIdentifier
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16495 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -36,8 +36,9 @@ public interface PublicServiceIdentifier
|
||||
/**
|
||||
* Get the name of the public service for the method invocation.
|
||||
*
|
||||
* @param mi
|
||||
* @return
|
||||
* @param mi the method invocation
|
||||
* @return Returns the name of the public service or <tt>null</tt> if it is
|
||||
* not recognized as a public service
|
||||
*/
|
||||
public String getPublicServiceName(MethodInvocation mi);
|
||||
}
|
||||
|
@@ -39,15 +39,15 @@ import org.springframework.beans.factory.BeanFactoryAware;
|
||||
import org.springframework.beans.factory.ListableBeanFactory;
|
||||
|
||||
/**
|
||||
* Identify public services by method invocation. Look ups are cached on a thread local as they are quite expensive. All public service names end with "Service" and start with
|
||||
* capital letter. This pattern is used to filter bean names. TODO: Look at pulling out all the mappings at start up.
|
||||
* Identify public services by method invocation. Look ups are cached on a thread local as they are quite expensive.
|
||||
* All public service names end with "Service" and start with capital letter.
|
||||
* This pattern is used to filter bean names. TODO: Look at pulling out all the mappings at start up.
|
||||
*
|
||||
* @author Andy Hind
|
||||
*/
|
||||
public class PublicServiceIdentifierImpl implements PublicServiceIdentifier, BeanFactoryAware
|
||||
{
|
||||
private static Log s_logger = LogFactory.getLog(PublicServiceIdentifierImpl.class);
|
||||
|
||||
private static ThreadLocal<HashMap<Method, String>> methodToServiceMap = new ThreadLocal<HashMap<Method, String>>();
|
||||
|
||||
private ListableBeanFactory beanFactory;
|
||||
@@ -57,26 +57,19 @@ public class PublicServiceIdentifierImpl implements PublicServiceIdentifier, Bea
|
||||
super();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setBeanFactory(BeanFactory beanFactory) throws BeansException
|
||||
{
|
||||
this.beanFactory = (ListableBeanFactory)beanFactory;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String getPublicServiceName(MethodInvocation mi)
|
||||
{
|
||||
return getServiceName(mi);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* Cache service name look up.
|
||||
*
|
||||
* @param mi
|
||||
* @return
|
||||
* @throws BeansException
|
||||
*/
|
||||
private String getServiceName(MethodInvocation mi) throws BeansException
|
||||
{
|
||||
@@ -104,11 +97,9 @@ public class PublicServiceIdentifierImpl implements PublicServiceIdentifier, Bea
|
||||
/**
|
||||
* Do the look up by interface type.
|
||||
*
|
||||
* @param mi
|
||||
* @return
|
||||
* @throws BeansException
|
||||
* @return Returns the name of the service or <tt>null</tt> if not found
|
||||
*/
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private String getServiceNameImpl(MethodInvocation mi) throws BeansException
|
||||
{
|
||||
Class clazz = mi.getThis().getClass();
|
||||
|
Reference in New Issue
Block a user