agave-tags/tags-core/src/main/java/org/iplantc/service/tags/managers/TagPermissionManager.java
/**
	 * Removes all permissions granted on a tag. Implied permission cannot change.
	 * 
	 * @return true if removed, false otherwise.
	 * @throws TagPermissionException
	 */
Removes all permissions granted on a tag. Implied permission cannot change.

@return true if removed, false otherwise.
Removes all permissions granted on a tag . Implied permission cannot change . @return true if removed false otherwise .
public boolean clearPermissions() throws TagPermissionException 
	{
		if (tag == null) {
			throw new TagPermissionException("No tag found for permission validation");
		}
		else {
			for (TagPermission permission: PermissionDao.getEntityPermissions(tag.getUuid())) {
				PermissionDao.delete(permission);
				TagEventProcessor eventProcessor = new TagEventProcessor();
				try {
					eventProcessor.processPermissionEvent(tag, permission, 
							new TagEvent(tag.getUuid(), 
									TagEventType.PERMISSION_REVOKE, 
									"Permissions revoked for user " + permission.getUsername() + " by user " + TenancyHelper.getCurrentEndUser(),
									TenancyHelper.getCurrentEndUser()));
				} catch (TagEventProcessingException e) {
					log.error("Failed to send all permission revocation event for tag " + tag.getUuid(), e);
				}
			}
			return true;
		}
	}
public boolean clearPermissions ( ) throws TagPermissionException { if ( tag == null ) { throw new TagPermissionException ( "No tag found for permission validation" ) ; } else { for ( TagPermission permission : PermissionDao . getEntityPermissions ( tag . getUuid ( ) ) ) { PermissionDao . delete ( permission ) ; TagEventProcessor eventProcessor = new TagEventProcessor ( ) ; try { eventProcessor . processPermissionEvent ( tag , permission , new TagEvent ( tag . getUuid ( ) , TagEventType . PERMISSION_REVOKE , "Permissions revoked for user " + permission . getUsername ( ) + " by user " + TenancyHelper . getCurrentEndUser ( ) , TenancyHelper . getCurrentEndUser ( ) ) ) ; } catch ( TagEventProcessingException e ) { log . error ( "Failed to send all permission revocation event for tag " + tag . getUuid ( ) , e ) ; } } return true ; } }
Removes all permissions granted on a tag.
Removes all permissions granted on a tag .
// iterate over the events so we can process the individual events