else l = saveRS(rDef, list);
gateway.annotateAttributesData(l); } else l = saveRS(rDef, list);
    public void saveRenderingSettings(int pixelsID, int imageID,                                        RenderingDef rDef)        throws DSOutOfServiceException, DSAccessException    {         UserDetails uc = registry.getDataManagementService().getUserDetails();        Criteria c = ImageMapper.buildRenderingSettingsCriteria(                            STSMapper.IMAGE_GRANULARITY, imageID,                             uc.getUserID());        List list = (List) gateway.retrieveListSTSData("RenderingSettings", c);        //List of renderingSettings to save in DB.          List l = new ArrayList();        if (list != null) {            if (list.size() == 0)  //nothing previously saved by the user.                l = saveRSFirstTime(imageID, rDef);            else l = saveRS(rDef, list);            gateway.updateAttributes(l);        }    }