04-07-2014 08:45 AM
<bean id="webscript.bla.fileStates.get"
class="bla.FileStatesList"
parent="webscript">
<property name="cifsServerBean" ref="cifsServer" />
</bean>
04-07-2014 11:05 AM
<bean id="fileServerConfiguration"
parent="fileServerConfigurationBase"
factory-bean="fileServerConfigurationFactory"
factory-method="createFileServerConfiguration">
public ServerConfigurationBean createFileServerConfiguration()
{
return new ServerConfigurationBean();
}
04-07-2014 11:48 PM
import org.alfresco.repo.management.subsystems.ChildApplicationContextFactory;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.extensions.webscripts.AbstractWebScript;
import org.springframework.extensions.webscripts.WebScriptRequest;
import org.springframework.extensions.webscripts.WebScriptResponse;
import org.alfresco.filesys.CIFSServerBean;
import org.alfresco.jlan.server.config.ServerConfiguration;
public class FileServerStatusWebScript extends AbstractWebScript implements ApplicationContextAware{
private ApplicationContext applicationContext;
@Override
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
{
this.applicationContext = applicationContext;
}
public void execute(WebScriptRequest req, WebScriptResponse res) throws IOException
{
ChildApplicationContextFactory subsystem = (ChildApplicationContextFactory)applicationContext.getBean("fileServers");
CIFSServerBean cifsServer = (CIFSServerBean) subsystem.getApplicationContext().getBean("cifsServer");//get cifs server bean
ServerConfiguration sc = cifsServer.getConfiguration(); //get configuration
// do what you want to do
}
}
04-08-2014 01:44 AM
04-28-2014 02:52 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.