LanEventPrivatePropertyKey.java 1.84 KB
/*
 * Copyright Codecrew Ry
 * 
 * All rights reserved.
 * 
 * This license applies to any software containing a notice placed by the 
 * copyright holder. Such software is herein referred to as the Software. 
 * This license covers modification, distribution and use of the Software. 
 * 
 * Any distribution and use in source and binary forms, with or without 
 * modification is not permitted without explicit written permission from the 
 * copyright owner. 
 * 
 * A non-exclusive royalty-free right is granted to the copyright owner of the 
 * Software to use, modify and distribute all modifications to the Software in 
 * future versions of the Software. 
 * 
 */
package fi.codecrew.moya.model;

// Private data that should never be allowed out of the EJB layer!
public enum LanEventPrivatePropertyKey {
    VERKKOMAKSU_KEY_EXPIRE(Type.DATE, null),
    VERKKOMAKSU_MERCHANT_ID(Type.TEXT, null),
    VERKKOMAKSU_MERCHANT_PASSWORD(Type.TEXT, null),
    CHECKOUT_FI_MERCHANT_PASSWORD(Type.TEXT, null),
    CHECKOUT_FI_MERCHANT_ID(Type.TEXT, null),
    CHECKOUT_FI_KEY_EXPIRE(Type.DATE, null),
    LDAP_URL(Type.TEXT, null),
    LDAP_BIND_DN(Type.TEXT, null),
    LDAP_BIND_PW(Type.TEXT, null),
    LDAP_USER_OU(Type.TEXT, null),
    LDAP_GROUP_OU(Type.TEXT, null),

    ;
    private enum Type {
        TEXT, DATE, DATA
    };

    private final String defaultvalue;
    private final Type type;

    public boolean isText() {
        return Type.TEXT.equals(type);
    }

    public boolean isDate() {
        return Type.DATE.equals(type);
    }

    public boolean isData() {
        return Type.DATA.equals(type);
    }

    private LanEventPrivatePropertyKey(Type t, String def)
    {
        this.type = t;
        defaultvalue = def;
    }

    public String getDefaultvalue() {
        return defaultvalue;
    }

    public Type getType() {
        return type;
    }
}