The Deployment facade contains many methods like getServer"Something"(String serverId). It is also not clear whether
null/false return values mean that the server instance was removed or it is the real value. This should be refactored to
single ServerInstance class. Methods that will be deprecated in favor of ServerInstance:
public String getServerInstanceDisplayName (String id)
public String getServerID (String instanceId)
public J2eePlatform getJ2eePlatform(String serverInstanceID)
public String getServerDisplayName(String id)
public boolean isRunning(String serverInstanceID)
Attaching proposed change.
Created attachment 61671 [details]
EM01: Shouldn't Deployment#getServerInstance(String) check for null, even if it is not a legal parameter? Looks like
passing a null would result to InstanceRemovedException when invoking methods on the returned ServerInstance, which
could be rather confusing.
Re EM01: You are absolutely right about that. Fixed in following patch.
Created attachment 61745 [details]
updated patch (getServerInstance null check)
If there are no objections, I'll push this tomorrow.
Fixed in abfdb8bc2994.
Integrated into 'main-golden', available in NB_Trunk_Production #234 build
Log: #135324 ServerInstance representation in the API