mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +00:00
125781 rmunteanu: Merged 5.1.N (5.1.2) to 5.2.N (5.2.1) 125603 rmunteanu: Merged 5.1.1 (5.1.1) to 5.1.N (5.1.2) 125484 slanglois: MNT-16155 Update source headers - remove old Copyrights from Java and JSP dource files git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@127808 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
64 lines
1.3 KiB
Java
64 lines
1.3 KiB
Java
package org.alfresco.util;
|
|
|
|
import org.springframework.beans.factory.FactoryBean;
|
|
|
|
/**
|
|
* A simple factory for glueing together multiple arguments as a string
|
|
*
|
|
* @author dward
|
|
*/
|
|
public class StringAppendingFactoryBean implements FactoryBean
|
|
{
|
|
|
|
/** The items. */
|
|
private Object[] items;
|
|
|
|
/**
|
|
* Sets the items to be appended together.
|
|
*
|
|
* @param items
|
|
* the items
|
|
*/
|
|
public void setItems(Object[] items)
|
|
{
|
|
this.items = items;
|
|
}
|
|
|
|
/*
|
|
* (non-Javadoc)
|
|
* @see org.springframework.beans.factory.FactoryBean#getObject()
|
|
*/
|
|
public Object getObject() throws Exception
|
|
{
|
|
if (this.items == null)
|
|
{
|
|
return "";
|
|
}
|
|
StringBuilder buff = new StringBuilder(1024);
|
|
for (Object item : this.items)
|
|
{
|
|
buff.append(item);
|
|
}
|
|
return buff.toString();
|
|
}
|
|
|
|
/*
|
|
* (non-Javadoc)
|
|
* @see org.springframework.beans.factory.FactoryBean#getObjectType()
|
|
*/
|
|
public Class<?> getObjectType()
|
|
{
|
|
return String.class;
|
|
}
|
|
|
|
/*
|
|
* (non-Javadoc)
|
|
* @see org.springframework.beans.factory.FactoryBean#isSingleton()
|
|
*/
|
|
public boolean isSingleton()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
}
|