FileDocCategorySizeDatePackage
EntryInfo.javaAPI DocGlassfish v2 API6326Mon May 21 13:03:52 BST 2007com.sun.enterprise.security.jmac.config

EntryInfo

public final class EntryInfo extends Object

Fields Summary
private final String
className
private final Map
properties
private List
regContexts
Constructors Summary
EntryInfo(String className, Map properties)

        if (className == null) {
            throw new IllegalArgumentException(
                "Class name for registration entry cannot be null");
        }
        this.className = className;
        this.properties = properties;
    
EntryInfo(String className, Map properties, List ctxs)

        
        if (ctxs == null || ctxs.isEmpty()) {
            throw new IllegalArgumentException(
                "Registration entry must contain one or" +
                "more registration contexts");
        }
        this.className = className;
        this.properties = properties;
        this.regContexts = ctxs;
    
EntryInfo(String className, Map properties, javax.security.auth.message.config.AuthConfigFactory.RegistrationContext ctx)

        
        this.className = className;
        this.properties = properties;
        if (ctx != null) {
            RegistrationContext ctxImpl =
                new RegistrationContextImpl(ctx.getMessageLayer(),
                ctx.getAppContext(), ctx.getDescription(), ctx.isPersistent());
            List<RegistrationContext> newList =
                new ArrayList<RegistrationContext>(1);
            newList.add(ctxImpl);
            this.regContexts = newList;
        }
    
Methods Summary
booleanequals(com.sun.enterprise.security.jmac.config.EntryInfo target)

        if (target == null) {
            return false;
        }
        return ( !(isConstructorEntry() ^ target.isConstructorEntry()) &&
            matchStrings(className, target.getClassName()) &&
            matchMaps(properties, target.getProperties()) );
    
java.lang.StringgetClassName()

        return className;
    
java.util.MapgetProperties()

        return properties;
    
java.util.ListgetRegContexts()

        return regContexts;
    
booleanisConstructorEntry()

        return (regContexts == null);
    
static booleanmatchMaps(java.util.Map m1, java.util.Map m2)

        if (m1 == null && m2 == null) {
            return true;
        }
        if (m1 == null || m2 == null) {
            return false;
        }
        return m1.equals(m2);
    
static booleanmatchStrings(java.lang.String s1, java.lang.String s2)

        if (s1 == null && s2 == null) {
            return true;
        }
        if (s1 == null || s2 == null) {
            return false;
        }
        return s1.equals(s2);