}
public SiteNodeTypeDefinitionVO update(SiteNodeTypeDefinitionVO siteNodeTypeDefinitionVO, String[] availableServiceBindingValues) throws ConstraintException, SystemException
{
Database db = CastorDatabaseService.getDatabase();
ConstraintExceptionBuffer ceb = new ConstraintExceptionBuffer();
SiteNodeTypeDefinition siteNodeTypeDefinition = null;
beginTransaction(db);
try
{
siteNodeTypeDefinition = SiteNodeTypeDefinitionController.getController().getSiteNodeTypeDefinitionWithId(siteNodeTypeDefinitionVO.getSiteNodeTypeDefinitionId(), db);
siteNodeTypeDefinition.setValueObject(siteNodeTypeDefinitionVO);
//add validation here if needed
List availableServiceBindingList = new ArrayList();
if(availableServiceBindingValues != null)
{
for (int i=0; i < availableServiceBindingValues.length; i++)
{
AvailableServiceBinding availableServiceBinding = AvailableServiceBindingController.getController().getAvailableServiceBindingWithId(new Integer(availableServiceBindingValues[i]), db);
availableServiceBindingList.add(availableServiceBinding);
//siteNodeTypeDefinition.getAvailableServiceBindings().add(availableServiceBinding);
}
}
//logger.info("availableServiceBindingList:" + availableServiceBindingList);
siteNodeTypeDefinition.setAvailableServiceBindings(availableServiceBindingList);
//If any of the validations or setMethods reported an error, we throw them up now before create.
ceb.throwIfNotEmpty();
commitTransaction(db);
}
catch(ConstraintException ce)
{