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:
Derek Hulley
2009-09-24 14:45:47 +00:00
parent 3418597d85
commit fc3431ecb4
2 changed files with 9 additions and 17 deletions

View File

@@ -36,8 +36,9 @@ public interface PublicServiceIdentifier
/** /**
* Get the name of the public service for the method invocation. * Get the name of the public service for the method invocation.
* *
* @param mi * @param mi the method invocation
* @return * @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); public String getPublicServiceName(MethodInvocation mi);
} }

View File

@@ -39,15 +39,15 @@ import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.beans.factory.ListableBeanFactory; 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 * Identify public services by method invocation. Look ups are cached on a thread local as they are quite expensive.
* capital letter. This pattern is used to filter bean names. TODO: Look at pulling out all the mappings at start up. * 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 * @author Andy Hind
*/ */
public class PublicServiceIdentifierImpl implements PublicServiceIdentifier, BeanFactoryAware public class PublicServiceIdentifierImpl implements PublicServiceIdentifier, BeanFactoryAware
{ {
private static Log s_logger = LogFactory.getLog(PublicServiceIdentifierImpl.class); private static Log s_logger = LogFactory.getLog(PublicServiceIdentifierImpl.class);
private static ThreadLocal<HashMap<Method, String>> methodToServiceMap = new ThreadLocal<HashMap<Method, String>>(); private static ThreadLocal<HashMap<Method, String>> methodToServiceMap = new ThreadLocal<HashMap<Method, String>>();
private ListableBeanFactory beanFactory; private ListableBeanFactory beanFactory;
@@ -57,26 +57,19 @@ public class PublicServiceIdentifierImpl implements PublicServiceIdentifier, Bea
super(); super();
} }
public void setBeanFactory(BeanFactory beanFactory) throws BeansException public void setBeanFactory(BeanFactory beanFactory) throws BeansException
{ {
this.beanFactory = (ListableBeanFactory)beanFactory; this.beanFactory = (ListableBeanFactory)beanFactory;
} }
public String getPublicServiceName(MethodInvocation mi) public String getPublicServiceName(MethodInvocation mi)
{ {
return getServiceName(mi); return getServiceName(mi);
} }
/** /**
* {@inheritDoc}
* Cache service name look up. * Cache service name look up.
*
* @param mi
* @return
* @throws BeansException
*/ */
private String getServiceName(MethodInvocation mi) 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. * Do the look up by interface type.
* *
* @param mi * @return Returns the name of the service or <tt>null</tt> if not found
* @return
* @throws BeansException
*/ */
@SuppressWarnings("unchecked")
private String getServiceNameImpl(MethodInvocation mi) throws BeansException private String getServiceNameImpl(MethodInvocation mi) throws BeansException
{ {
Class clazz = mi.getThis().getClass(); Class clazz = mi.getThis().getClass();