agave-systems/systems-core/src/main/java/org/iplantc/service/systems/manager/SystemManager.java
/**
	 * Sets the publiclyAvailable flag on the RemoteSystem to false and triggers an event. This is a 
	 * pure db operation and no apps or data are associated with it. Also, it does not set a default 
	 * replacement system. That must be done separately by a super admin using the 
	 * SystemManager.updateSystem() method. If the system is the globalDefault, it will not be after 
	 * this occurs.
	 * 
	 * @param system system to be unpublished
	 * @param apiUsername user calling this action
	 * @throws SystemException
	 */
Sets the publiclyAvailable flag on the RemoteSystem to false and triggers an event. This is a
pure db operation and no apps or data are associated with it. Also, it does not set a default
replacement system. That must be done separately by a super admin using the
SystemManager.updateSystem() method. If the system is the globalDefault, it will not be after
this occurs.

@param system system to be unpublished
@param apiUsername user calling this action
@throws SystemException
Sets the publiclyAvailable flag on the RemoteSystem to false and triggers an event . This is a pure db operation and no apps or data are associated with it . Also it does not set a default replacement system . That must be done separately by a super admin using the SystemManager . updateSystem () method . If the system is the globalDefault it will not be after this occurs . @param system system to be unpublished @param apiUsername user calling this action @throws SystemException
public RemoteSystem unpublish(RemoteSystem system, String apiUsername) 
	throws SystemException
	{
		if (system == null) {
			throw new SystemException("No system provided.");
		} else if (!system.isPubliclyAvailable()) {
			return system;
		} 
		system.setPubliclyAvailable(false);
		system.setGlobalDefault(false);
		system.setLastUpdated(new Date());
		system.setRevision(system.getRevision() + 1);
		getDao().persist(system);
		getEventProcessor().processPublishEvent(system, SystemEventType.UNPUBLISH, apiUsername);
		return system;
	}
public RemoteSystem unpublish ( RemoteSystem system , String apiUsername ) throws SystemException { if ( system == null ) { throw new SystemException ( "No system provided." ) ; } else if ( ! system . isPubliclyAvailable ( ) ) { return system ; } system . setPubliclyAvailable ( false ) ; system . setGlobalDefault ( false ) ; system . setLastUpdated ( new Date ( ) ) ; system . setRevision ( system . getRevision ( ) + 1 ) ; getDao ( ) . persist ( system ) ; getEventProcessor ( ) . processPublishEvent ( system , SystemEventType . UNPUBLISH , apiUsername ) ; return system ; }
Sets the publiclyAvailable flag on the RemoteSystem to false and triggers an event.
Sets the publiclyAvailable flag on the RemoteSystem to false and triggers an event .
//		NotificationManager.process(system.getUuid(), "UNPUBLISH", apiUsername);