@Test public void testUpdateAcl() { List<UIRepositoryObjectAcl> originalUIAcls = Arrays.asList( new UIRepositoryObjectAcl[] { objectAcl1, objectAcl2 } ); repositoryObjectAcls.addAcls( originalUIAcls ); objectAcl2.addPermission( RepositoryFilePermission.DELETE ); repositoryObjectAcls.updateAcl( objectAcl2 ); for ( UIRepositoryObjectAcl uiAcl : repositoryObjectAcls.getAcls() ) { if ( objectAcl2.getRecipientName().equals( uiAcl.getRecipientName() ) ) { assertEquals( "Delete permission was not added", objectAcl2.getPermissionSet(), uiAcl.getPermissionSet() ); } } }
public void updateAcl( UIRepositoryObjectAcl aclToUpdate ) { List<ObjectAce> aces = obj.getAces(); for ( ObjectAce ace : aces ) { if ( ace.getRecipient().getName().equals( aclToUpdate.getRecipientName() ) ) { ace.setPermissions( aclToUpdate.getPermissionSet() ); } } UIRepositoryObjectAcl acl = getAcl( aclToUpdate.getRecipientName() ); acl.setPermissionSet( aclToUpdate.getPermissionSet() ); this.firePropertyChange( "acls", null, getAcls() ); selectedAclList.clear(); List<UIRepositoryObjectAcl> aclList = new ArrayList<UIRepositoryObjectAcl>(); aclList.add( aclToUpdate ); setSelectedAclList( aclList ); setModelDirty( true ); }
UIRepositoryObjectAcls extends XulEventSourceAdapter implements java.io.Serializable { public void updateAcl( UIRepositoryObjectAcl aclToUpdate ) { List<ObjectAce> aces = obj.getAces(); for ( ObjectAce ace : aces ) { if ( ace.getRecipient().getName().equals( aclToUpdate.getRecipientName() ) ) { ace.setPermissions( aclToUpdate.getPermissionSet() ); } } UIRepositoryObjectAcl acl = getAcl( aclToUpdate.getRecipientName() ); acl.setPermissionSet( aclToUpdate.getPermissionSet() ); this.firePropertyChange( "acls", null, getAcls() ); selectedAclList.clear(); List<UIRepositoryObjectAcl> aclList = new ArrayList<UIRepositoryObjectAcl>(); aclList.add( aclToUpdate ); setSelectedAclList( aclList ); setModelDirty( true ); } }
UIRepositoryObjectAcls extends XulEventSourceAdapter implements java.io.Serializable { public void updateAcl( UIRepositoryObjectAcl aclToUpdate ) { List<ObjectAce> aces = obj.getAces(); for ( ObjectAce ace : aces ) { if ( ace.getRecipient().getName().equals( aclToUpdate.getRecipientName() ) ) { ace.setPermissions( aclToUpdate.getPermissionSet() ); } } UIRepositoryObjectAcl acl = getAcl( aclToUpdate.getRecipientName() ); acl.setPermissionSet( aclToUpdate.getPermissionSet() ); this.firePropertyChange( "acls", null, getAcls() ); selectedAclList.clear(); List<UIRepositoryObjectAcl> aclList = new ArrayList<UIRepositoryObjectAcl>(); aclList.add( aclToUpdate ); setSelectedAclList( aclList ); setModelDirty( true ); } UIRepositoryObjectAcls(); }
UIRepositoryObjectAcls extends XulEventSourceAdapter implements java.io.Serializable { public void updateAcl( UIRepositoryObjectAcl aclToUpdate ) { List<ObjectAce> aces = obj.getAces(); for ( ObjectAce ace : aces ) { if ( ace.getRecipient().getName().equals( aclToUpdate.getRecipientName() ) ) { ace.setPermissions( aclToUpdate.getPermissionSet() ); } } UIRepositoryObjectAcl acl = getAcl( aclToUpdate.getRecipientName() ); acl.setPermissionSet( aclToUpdate.getPermissionSet() ); this.firePropertyChange( "acls", null, getAcls() ); selectedAclList.clear(); List<UIRepositoryObjectAcl> aclList = new ArrayList<UIRepositoryObjectAcl>(); aclList.add( aclToUpdate ); setSelectedAclList( aclList ); setModelDirty( true ); } UIRepositoryObjectAcls(); void setObjectAcl( ObjectAcl obj ); ObjectAcl getObjectAcl(); List<UIRepositoryObjectAcl> getAcls(); void setAcls( List<UIRepositoryObjectAcl> acls ); void addAcls( List<UIRepositoryObjectAcl> aclsToAdd ); void addDefaultAcls( List<UIRepositoryObjectAcl> aclsToAdd ); void addAcl( UIRepositoryObjectAcl aclToAdd ); void addDefaultAcl( UIRepositoryObjectAcl aclToAdd ); void removeAcls( List<UIRepositoryObjectAcl> aclsToRemove ); void removeAcl( String recipientName ); void removeSelectedAcls(); void updateAcl( UIRepositoryObjectAcl aclToUpdate ); UIRepositoryObjectAcl getAcl( String recipient ); List<UIRepositoryObjectAcl> getSelectedAclList(); void setSelectedAclList( List<UIRepositoryObjectAcl> list ); boolean isEntriesInheriting(); void setEntriesInheriting( boolean entriesInheriting ); ObjectRecipient getOwner(); void setRemoveEnabled( boolean removeEnabled ); boolean isRemoveEnabled(); int getAceIndex( ObjectAce ace ); ObjectAce getAceAtIndex( int index ); void setModelDirty( boolean modelDirty ); boolean isModelDirty(); boolean hasManageAclAccess(); void setHasManageAclAccess( boolean hasManageAclAccess ); void clear(); }
UIRepositoryObjectAcls extends XulEventSourceAdapter implements java.io.Serializable { public void updateAcl( UIRepositoryObjectAcl aclToUpdate ) { List<ObjectAce> aces = obj.getAces(); for ( ObjectAce ace : aces ) { if ( ace.getRecipient().getName().equals( aclToUpdate.getRecipientName() ) ) { ace.setPermissions( aclToUpdate.getPermissionSet() ); } } UIRepositoryObjectAcl acl = getAcl( aclToUpdate.getRecipientName() ); acl.setPermissionSet( aclToUpdate.getPermissionSet() ); this.firePropertyChange( "acls", null, getAcls() ); selectedAclList.clear(); List<UIRepositoryObjectAcl> aclList = new ArrayList<UIRepositoryObjectAcl>(); aclList.add( aclToUpdate ); setSelectedAclList( aclList ); setModelDirty( true ); } UIRepositoryObjectAcls(); void setObjectAcl( ObjectAcl obj ); ObjectAcl getObjectAcl(); List<UIRepositoryObjectAcl> getAcls(); void setAcls( List<UIRepositoryObjectAcl> acls ); void addAcls( List<UIRepositoryObjectAcl> aclsToAdd ); void addDefaultAcls( List<UIRepositoryObjectAcl> aclsToAdd ); void addAcl( UIRepositoryObjectAcl aclToAdd ); void addDefaultAcl( UIRepositoryObjectAcl aclToAdd ); void removeAcls( List<UIRepositoryObjectAcl> aclsToRemove ); void removeAcl( String recipientName ); void removeSelectedAcls(); void updateAcl( UIRepositoryObjectAcl aclToUpdate ); UIRepositoryObjectAcl getAcl( String recipient ); List<UIRepositoryObjectAcl> getSelectedAclList(); void setSelectedAclList( List<UIRepositoryObjectAcl> list ); boolean isEntriesInheriting(); void setEntriesInheriting( boolean entriesInheriting ); ObjectRecipient getOwner(); void setRemoveEnabled( boolean removeEnabled ); boolean isRemoveEnabled(); int getAceIndex( ObjectAce ace ); ObjectAce getAceAtIndex( int index ); void setModelDirty( boolean modelDirty ); boolean isModelDirty(); boolean hasManageAclAccess(); void setHasManageAclAccess( boolean hasManageAclAccess ); void clear();  }