/** {@inheritDoc} */ public TreeNode wrap(final Group theObjectSource) throws ESCOWrapperException { TreeNode treeGroup = new TreeNode(); Attributes attributes = new Attributes(); attributes.setId(theObjectSource.getIdGroup()); attributes.setName(theObjectSource.getName()); attributes.setDisplayName(theObjectSource.getDisplayName()); attributes.setType(TreeGroupWrapper.GROUP); attributes.setRight(theObjectSource.getUserRight().getName()); if (theObjectSource.isCanOptin()) { attributes.setOptin(Boolean.TRUE.toString()); } else { attributes.setOptin(Boolean.FALSE.toString()); } if (theObjectSource.isCanOptout()) { attributes.setOptout(Boolean.TRUE.toString()); } else { attributes.setOptout(Boolean.FALSE.toString()); } treeGroup.setAttributes(attributes); treeGroup.setData(this.getViewDataFormatted(theObjectSource)); treeGroup.setState(""); return treeGroup; }