mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +00:00
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/BRANCHES/DEV/5.1.N/root@125603 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
44 lines
1.2 KiB
Java
44 lines
1.2 KiB
Java
package org.alfresco.util;
|
|
|
|
import org.alfresco.util.bean.BooleanBean;
|
|
|
|
/**
|
|
* Wraps a {@link org.alfresco.util.JodCoordination} object to return one of its boolean methods,
|
|
* so that it may be used as the input to another bean.
|
|
*
|
|
* @author Alan Davis
|
|
*/
|
|
public class JodCoordinationBoolean implements BooleanBean
|
|
{
|
|
private JodCoordination jodCoordination;
|
|
private String returnValue;
|
|
|
|
public void setJodCoordination(JodCoordination jodCoordination)
|
|
{
|
|
this.jodCoordination = jodCoordination;
|
|
}
|
|
|
|
public void setReturnValue(String returnValue)
|
|
{
|
|
this.returnValue = returnValue;
|
|
}
|
|
|
|
@Override
|
|
public boolean isTrue()
|
|
{
|
|
if ("startOpenOffice".equals(returnValue))
|
|
{
|
|
return jodCoordination.startOpenOffice();
|
|
}
|
|
else if ("startListener".equals(returnValue))
|
|
{
|
|
return jodCoordination.startListener();
|
|
}
|
|
else
|
|
{
|
|
throw new IllegalArgumentException("Expected \"startOpenOffice\" or \"startListener\" " +
|
|
"as the returnValue property, but it was \""+returnValue+"\"");
|
|
}
|
|
}
|
|
}
|