/*package*/ GHTeam wrapUp(GitHub root) { // auto-wrapUp when organization is known from GET /user/teams this.organization.wrapUp(root); return wrapUp(organization); }
/*package*/ GHTeam wrapUp(GitHub root) { // auto-wrapUp when organization is known from GET /user/teams this.organization.wrapUp(root); return wrapUp(organization); }
/*package*/ GHTeam wrapUp(GitHub root) { // auto-wrapUp when organization is known from GET /user/teams this.organization.wrapUp(root); return wrapUp(organization); }
/** * Gets {@link GHOrganization} specified by name. */ public GHOrganization getOrganization(String name) throws IOException { GHOrganization o = orgs.get(name); if (o==null) { o = retrieve().to("/orgs/" + name, GHOrganization.class).wrapUp(this); orgs.put(name,o); } return o; }
public GHOrganization getOrganization(String name) throws IOException { GHOrganization o = orgs.get(name); if (o==null) { o = retrieve().to("/orgs/" + name, GHOrganization.class).wrapUp(this); orgs.put(name,o); } return o; }
/** * Gets {@link GHOrganization} specified by name. */ public GHOrganization getOrganization(String name) throws IOException { GHOrganization o = orgs.get(name); if (o==null) { o = retrieve().to("/orgs/" + name, GHOrganization.class).wrapUp(this); orgs.put(name,o); } return o; }
/*package*/ GHMembership wrap(GitHub root) { this.root = root; if (user!=null) user = root.getUser(user.wrapUp(root)); if (organization!=null) organization.wrapUp(root); return this; }
/*package*/ GHMembership wrap(GitHub root) { this.root = root; if (user!=null) user = root.getUser(user.wrapUp(root)); if (organization!=null) organization.wrapUp(root); return this; }
@Override void wrapUp(GitHub root) { super.wrapUp(root); repository.wrap(root); if (organization != null) { organization.wrapUp(root); } }
@Override void wrapUp(GitHub root) { super.wrapUp(root); if (repository!=null) repository.wrap(root); if (organization != null) { organization.wrapUp(root); } }
@Override void wrapUp(GitHub root) { super.wrapUp(root); repository.wrap(root); if (organization != null) { organization.wrapUp(root); } }
@Override void wrapUp(GitHub root) { super.wrapUp(root); if (repository!=null) repository.wrap(root); if (organization != null) { organization.wrapUp(root); } }
/** * This method returns a shallowly populated organizations. * * To retrieve full organization details, you need to call {@link #getOrganization(String)} * TODO: make this automatic. */ public Map<String, GHOrganization> getMyOrganizations() throws IOException { GHOrganization[] orgs = retrieve().to("/user/orgs", GHOrganization[].class); Map<String, GHOrganization> r = new HashMap<String, GHOrganization>(); for (GHOrganization o : orgs) { // don't put 'o' into orgs because they are shallow r.put(o.getLogin(),o.wrapUp(this)); } return r; }
/** * This method returns a shallowly populated organizations. * * To retrieve full organization details, you need to call {@link #getOrganization(String)} * TODO: make this automatic. */ public Map<String, GHOrganization> getMyOrganizations() throws IOException { GHOrganization[] orgs = retrieve().to("/user/orgs", GHOrganization[].class); Map<String, GHOrganization> r = new HashMap<String, GHOrganization>(); for (GHOrganization o : orgs) { // don't put 'o' into orgs because they are shallow r.put(o.getLogin(),o.wrapUp(this)); } return r; }
/** * This method returns a shallowly populated organizations. * * To retrieve full organization details, you need to call {@link #getOrganization(String)} * TODO: make this automatic. */ public Map<String, GHOrganization> getMyOrganizations() throws IOException { GHOrganization[] orgs = retrieve().to("/user/orgs", GHOrganization[].class); Map<String, GHOrganization> r = new HashMap<String, GHOrganization>(); for (GHOrganization o : orgs) { // don't put 'o' into orgs because they are shallow r.put(o.getLogin(),o.wrapUp(this)); } return r; }