agave-systems/systems-core/src/main/java/org/iplantc/service/systems/manager/SystemManager.java
/**
	 * Deletes the stored AuthConfig for a given RemoteConfig type for an internal 
	 * user on every system of the given api user.
	 * 
	 * @param apiUsername
	 * @param internalUsername
	 * @throws SystemArgumentException
	 */
Deletes the stored AuthConfig for a given RemoteConfig type for an internal
user on every system of the given api user.

@param apiUsername
@param internalUsername
@throws SystemArgumentException
Deletes the stored AuthConfig for a given RemoteConfig type for an internal user on every system of the given api user . @param apiUsername @param internalUsername @throws SystemArgumentException
public void removeAllInternalUserAuthConfigOfType(String apiUsername, 
			String internalUsername, String remoteConfigType) 
	throws SystemArgumentException 
	{
		if (StringUtils.isEmpty(apiUsername)) {
			throw new SystemArgumentException("No username provided.");
		}
		if (StringUtils.isEmpty(internalUsername)) {
			throw new SystemArgumentException("No internal username provided.");
		}
		if (remoteConfigType == null) {
			throw new SystemArgumentException("No credential type provided. " +
					"Please specify either 'login' or 'storage'");
		} else if (!(remoteConfigType.equalsIgnoreCase("storage") || 
				remoteConfigType.equalsIgnoreCase("login"))) {
			throw new SystemArgumentException("Invalid credential type '" + 
				remoteConfigType + "'. Please specify either 'login' or 'storage'");
		} 
		for(RemoteSystem system: getDao().getUserSystems(apiUsername, false)) 
		{
			if (!system.getUserRole(apiUsername).getRole().canAdmin()) continue;
			if (remoteConfigType.equalsIgnoreCase("login"))
			{
				if (system instanceof ExecutionSystem) 
				{
					AuthConfig loginAuthConfig = ((ExecutionSystem)system).getLoginConfig().getAuthConfigForInternalUsername(internalUsername);
					if (!loginAuthConfig.isSystemDefault()) {
						for (AuthConfig config: ((ExecutionSystem)system).getLoginConfig().getAuthConfigs()) {
							if (config.getInternalUsername() != null && internalUsername.equals(config.getInternalUsername())) {
								((ExecutionSystem)system).getLoginConfig().getAuthConfigs().remove(config);
								getEventProcessor().processSystemUpdateEvent(system, SystemEventType.REMOVE_CREDENTIAL, internalUsername);
							}
						}
						getDao().persist(system);
					}
				}
			} 
			else 
			{
				AuthConfig storageAuthConfig = system.getStorageConfig().getAuthConfigForInternalUsername(internalUsername);
				if (!storageAuthConfig.isSystemDefault()) {
					for (AuthConfig config: system.getStorageConfig().getAuthConfigs()) {
						if (config.getInternalUsername() != null && internalUsername.equals(config.getInternalUsername())) {
							system.getStorageConfig().getAuthConfigs().remove(config);
							getEventProcessor().processSystemUpdateEvent(system, SystemEventType.REMOVE_CREDENTIAL, internalUsername);
						}
					}
					getDao().persist(system);
				}
			}
		}
	}
public void removeAllInternalUserAuthConfigOfType ( String apiUsername , String internalUsername , String remoteConfigType ) throws SystemArgumentException { if ( StringUtils . isEmpty ( apiUsername ) ) { throw new SystemArgumentException ( "No username provided." ) ; } if ( StringUtils . isEmpty ( internalUsername ) ) { throw new SystemArgumentException ( "No internal username provided." ) ; } if ( remoteConfigType == null ) { throw new SystemArgumentException ( "No credential type provided. " + "Please specify either 'login' or 'storage'" ) ; } else if ( ! ( remoteConfigType . equalsIgnoreCase ( "storage" ) || remoteConfigType . equalsIgnoreCase ( "login" ) ) ) { throw new SystemArgumentException ( "Invalid credential type '" + remoteConfigType + "'. Please specify either 'login' or 'storage'" ) ; } for ( RemoteSystem system : getDao ( ) . getUserSystems ( apiUsername , false ) ) { if ( ! system . getUserRole ( apiUsername ) . getRole ( ) . canAdmin ( ) ) continue ; if ( remoteConfigType . equalsIgnoreCase ( "login" ) ) { if ( system instanceof ExecutionSystem ) { AuthConfig loginAuthConfig = ( ( ExecutionSystem ) system ) . getLoginConfig ( ) . getAuthConfigForInternalUsername ( internalUsername ) ; if ( ! loginAuthConfig . isSystemDefault ( ) ) { for ( AuthConfig config : ( ( ExecutionSystem ) system ) . getLoginConfig ( ) . getAuthConfigs ( ) ) { if ( config . getInternalUsername ( ) != null && internalUsername . equals ( config . getInternalUsername ( ) ) ) { ( ( ExecutionSystem ) system ) . getLoginConfig ( ) . getAuthConfigs ( ) . remove ( config ) ; getEventProcessor ( ) . processSystemUpdateEvent ( system , SystemEventType . REMOVE_CREDENTIAL , internalUsername ) ; } } getDao ( ) . persist ( system ) ; } } } else { AuthConfig storageAuthConfig = system . getStorageConfig ( ) . getAuthConfigForInternalUsername ( internalUsername ) ; if ( ! storageAuthConfig . isSystemDefault ( ) ) { for ( AuthConfig config : system . getStorageConfig ( ) . getAuthConfigs ( ) ) { if ( config . getInternalUsername ( ) != null && internalUsername . equals ( config . getInternalUsername ( ) ) ) { system . getStorageConfig ( ) . getAuthConfigs ( ) . remove ( config ) ; getEventProcessor ( ) . processSystemUpdateEvent ( system , SystemEventType . REMOVE_CREDENTIAL , internalUsername ) ; } } getDao ( ) . persist ( system ) ; } } } }
Deletes the stored AuthConfig for a given RemoteConfig type for an internal
 user on every system of the given api user.
Deletes the stored AuthConfig for a given RemoteConfig type for an internal user on every system of the given api user .
//								NotificationManager.process(system.getUuid(), "REMOVE_CREDENTIAL", internalUsername); //							NotificationManager.process(system.getUuid(), "REMOVE_CREDENTIAL", internalUsername);