class ZMSImpl implements Authorizer, KeyStore, ZMSHandler {

    Principal createPrincipalForName(String principalName) {

        String domain;
        String name;

        // if we have no . in the principal name we're going to default
        // to our configured user domain

        int idx = principalName.lastIndexOf('.');
        if (idx == -1) {
            domain = userDomain;
            name = principalName;
        } else {
            domain = principalName.substring(0, idx);
            if (userDomainAlias != null && userDomainAlias.equals(domain)) {
                domain = userDomain;
            }
            name = principalName.substring(idx + 1);
        }

        return SimplePrincipal.create(domain, name, (String) null);
    }

    public  ZMSImpl();

}