/** * Adds this as a member of the given group, registers with application if necessary */ @Override public void addGroup(Group e) { groups.add(e); getApplication(); }
@Override public String getApplicationId() { Application app = getApplication(); return (app == null) ? null : app.getId(); }
/** @deprecated since 0.4.0 should not be needed / leaked outwith brooklyn internals / mgmt support? */ protected synchronized void setApplication(Application app) { if (application != null) { if (application.getId() != app.getId()) { throw new IllegalStateException("Cannot change application of entity (attempted for "+this+" from "+getApplication()+" to "+app); } } this.application = app; }
previouslyOwned = true; getApplication();