package uk.gov.register.presentation.resource;

import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.core.Context;

public abstract class ResourceBase {
    public static final int ENTRY_LIMIT = 100;
    @Context
    protected HttpServletRequest httpServletRequest;

    //Note: copied the logic to fetch primary key from alpha register.
    //Note: We might need to change the logic of extracting register primary key for beta registers
    protected String getRegisterPrimaryKey() {
        String host = httpServletRequest.getHeader("Host");

        if (host.contains(".")) {
            return host.substring(0, host.indexOf("."));
        } else {
            return host;
        }
    }
}


@@ -276,179 +276,8 @@
 t;%0A%0A
-    //Note: copied the logic to fetch primary key from alpha register.%0A    //Note: We might need to change the logic of extracting register primary key for beta registers%0A
     

remove dead comment