// Path: de.hatoka.group/src/main/java/de/hatoka/group/capi/business/GroupBO.java
// public interface GroupBO
// {
//     /**
//      * @return userRef of owner
//      */
//     String getOwner();
// 
//     /**
//      * Removes the group
//      */
//     void remove();
// 
//     /**
//      * @return name of group
//      */
//     String getName();
// 
//     /**
//      * Create member for given user
//      * @param userRef
//      * @param name of member in side of the group
//      * @return
//      */
//     MemberBO createMember(String userRef, String name);
// 
//     /**
//      * @return members of the group (owner is one member)
//      */
//     Collection<MemberBO> getMembers();
// 
//     /**
//      * @return identifier of group
//      */
//     String getID();
// 
//     /**
//      * @param userRef
//      * @return the member instance of the given user.
//      */
//     MemberBO getMember(String userRef);
// 
//     /**
//      * @param userRef
//      * @return true in case user is member of this group
//      */
//     boolean isMember(String userRef);
// }
// 
// Path: de.hatoka.group/src/main/java/de/hatoka/group/capi/business/GroupBusinessFactory.java
// public interface GroupBusinessFactory
// {
//     GroupBO findGroupBOByName(String name);
// 
//     GroupBO getGroupBO(GroupPO groupPO);
// 
//     GroupBORepository getGroupBORepository(String ownerRef);
// 
//     MemberBO getMemberBO(MemberPO memberPO);
// 
//     List<GroupBO> getGroupBOsByUser(String userRef);
// 
//     GroupBO getGroupBOByID(String groupID);
// }


import java.util.List;
import java.util.stream.Collectors;
import javax.inject.Inject;
import de.hatoka.common.capi.app.servlet.RequestUserRefProvider;
import de.hatoka.group.capi.business.GroupBO;
import de.hatoka.group.capi.business.GroupBusinessFactory;
import de.hatoka.group.capi.business.MemberBO;
package de.hatoka.group.internal.app.member;




public class GroupMemberAction
{
    @Inject
    private GroupBusinessFactory factory;
    @Inject
    private RequestUserRefProvider userRefProvider;

    private final String groupID;

    public GroupMemberAction(String groupID)
    {
        this.groupID = groupID;
    }

    public GroupMemberModel getGroupModel()
    {
        return new GroupMemberModel(groupID, getAccessableGroup().getName());
    }

    private GroupBO getAccessableGroup()
    {
// Path: de.hatoka.group/src/main/java/de/hatoka/group/capi/business/GroupBO.java
// public interface GroupBO
// {
//     /**
//      * @return userRef of owner
//      */
//     String getOwner();
// 
//     /**
//      * Removes the group
//      */
//     void remove();
// 
//     /**
//      * @return name of group
//      */
//     String getName();
// 
//     /**
//      * Create member for given user
//      * @param userRef
//      * @param name of member in side of the group
//      * @return
//      */
//     MemberBO createMember(String userRef, String name);
// 
//     /**
//      * @return members of the group (owner is one member)
//      */
//     Collection<MemberBO> getMembers();
// 
//     /**
//      * @return identifier of group
//      */
//     String getID();
// 
//     /**
//      * @param userRef
//      * @return the member instance of the given user.
//      */
//     MemberBO getMember(String userRef);
// 
//     /**
//      * @param userRef
//      * @return true in case user is member of this group
//      */
//     boolean isMember(String userRef);
// }
// 
// Path: de.hatoka.group/src/main/java/de/hatoka/group/capi/business/GroupBusinessFactory.java
// public interface GroupBusinessFactory
// {
//     GroupBO findGroupBOByName(String name);
// 
//     GroupBO getGroupBO(GroupPO groupPO);
// 
//     GroupBORepository getGroupBORepository(String ownerRef);
// 
//     MemberBO getMemberBO(MemberPO memberPO);
// 
//     List<GroupBO> getGroupBOsByUser(String userRef);
// 
//     GroupBO getGroupBOByID(String groupID);
// }


// Path: de.hatoka.group/src/main/java/de/hatoka/group/internal/app/member/GroupMemberAction.java
import java.util.List;
import java.util.stream.Collectors;
import javax.inject.Inject;
import de.hatoka.common.capi.app.servlet.RequestUserRefProvider;
import de.hatoka.group.capi.business.GroupBO;
import de.hatoka.group.capi.business.GroupBusinessFactory;
import de.hatoka.group.capi.business.MemberBO;

package de.hatoka.group.internal.app.member;




public class GroupMemberAction
{
    @Inject
    private GroupBusinessFactory factory;
    @Inject
    private RequestUserRefProvider userRefProvider;

    private final String groupID;

    public GroupMemberAction(String groupID)
    {
        this.groupID = groupID;
    }

    public GroupMemberModel getGroupModel()
    {
        return new GroupMemberModel(groupID, getAccessableGroup().getName());
    }

    private GroupBO getAccessableGroup()
    {
        GroupBO groupBO = factory.getGroupBOByID(groupID);