}
public CommunicationEnvelope execute(CommunicationEnvelope envelope)
{
CommunicationEnvelope responseEnvelope = new CommunicationEnvelope();
try
{
String action = envelope.getAction();
logger.info("ACTION:" + action);
if(action.equals("selectRootNode"))
{
responseEnvelope = getRootSiteNode(envelope);
}
if(action.equals("selectNode"))
{
responseEnvelope = getSiteNode(envelope);
}
else if(action.equals("selectChildNodes"))
{
responseEnvelope = getChildSiteNodes(envelope);
}
/*
else if(action.equals("createSiteNode"))
{
responseEnvelope = createSiteNode(envelope);
}
else if(action.equals("updateSiteNode"))
{
responseEnvelope = updateSiteNode(envelope);
}
else if(action.equals("deleteSiteNode"))
{
responseEnvelope = deleteSiteNode(envelope);
}
*/
logger.info("Executing in SiteNodeService...");
}
catch (Exception e)
{
responseEnvelope.setStatus("1");
e.printStackTrace();
}
return responseEnvelope;
}