agave-tags/tags-core/src/main/java/org/iplantc/service/tags/managers/TaggedResourceManager.java
/**
	 * Deletes a tag and sends the appropriate notifications. Permissions
	 * are verified prior to deletion.
	 * 
	 * @param uuid the uuid to untag
	 * @param username the requesting username
	 * @return true if deletion occurred, false otherwise
	 * @throws TagException
	 * @throws TagPermissionException
	 */
Deletes a tag and sends the appropriate notifications. Permissions
are verified prior to deletion.


Deletes a tag and sends the appropriate notifications . Permissions are verified prior to deletion .
public boolean deleteFromTag(String uuid, String username) 
	throws TagException, TagPermissionException, UnknownTaggedResourceException
	{	
		if (tag == null) {
			throw new TagException("No tag specifed");
		}
		if (StringUtils.isBlank(uuid)) {
			throw new TagException("No resource uuid specifed for removal");
		}
		TagPermissionManager pm = new TagPermissionManager(tag);
		if (!pm.canWrite(username)) {
    		throw new TagPermissionException("User does not have permission to view this tag");
    	}
    	else {
    		TaggedResource match = tag.getTaggedResource(uuid);
			if (match != null) {
				tag.getTaggedResources().remove(match);
				getDao().persist(tag);
	    		try {
					eventProcessor.processContentEvent(tag, 
							new TagEvent(tag.getUuid(),
									TagEventType.DELETED,
									"Resource " + uuid + " was removed by " + username,
									username));
				} catch (TagEventProcessingException e) {
					log.error("Failed to send resource " + uuid + " removal event for tag " + tag.getUuid(), e);
				}
			}
			else {
				return false;
			}
			return true;
    	}
	}
public boolean deleteFromTag ( String uuid , String username ) throws TagException , TagPermissionException , UnknownTaggedResourceException { if ( tag == null ) { throw new TagException ( "No tag specifed" ) ; } if ( StringUtils . isBlank ( uuid ) ) { throw new TagException ( "No resource uuid specifed for removal" ) ; } TagPermissionManager pm = new TagPermissionManager ( tag ) ; if ( ! pm . canWrite ( username ) ) { throw new TagPermissionException ( "User does not have permission to view this tag" ) ; } else { TaggedResource match = tag . getTaggedResource ( uuid ) ; if ( match != null ) { tag . getTaggedResources ( ) . remove ( match ) ; getDao ( ) . persist ( tag ) ; try { eventProcessor . processContentEvent ( tag , new TagEvent ( tag . getUuid ( ) , TagEventType . DELETED , "Resource " + uuid + " was removed by " + username , username ) ) ; } catch ( TagEventProcessingException e ) { log . error ( "Failed to send resource " + uuid + " removal event for tag " + tag . getUuid ( ) , e ) ; } } else { return false ; } return true ; } }
Deletes a tag and sends the appropriate notifications.
Deletes a tag and sends the appropriate notifications .
//				throw new UnknownTaggedResourceException("Resource " + associatedId + " is not associated tag " + tag.getName());