All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.tdchain.tdmsp.accessctl.TacticEntity Maven / Gradle / Ivy

There is a newer version: 3.0.1.TD1
Show newest version
/*
 * Copyright (c) 2017 Beijing Tiande Technology Co., Ltd.
 * All Rights Reserved.
 */
package cn.tdchain.tdmsp.accessctl;

import org.apache.commons.collections.CollectionUtils;

import java.util.List;

/**
 * 权限策略
 */
public class TacticEntity {
    private List writeTrans;
    private List admins;

    public static boolean check(TacticEntity entity) {
        if (entity == null) {
            return false;
        }
        if (CollectionUtils.isEmpty(entity.admins)) {
            return false;
        }
        if (CollectionUtils.isEmpty(entity.writeTrans)) {
            return false;
        }
        return true;
    }

    public List getWriteTrans() {
        return writeTrans;
    }

    public void setWriteTrans(List writeTrans) {
        this.writeTrans = writeTrans;
    }

    public List getAdmins() {
        return admins;
    }

    public void setAdmins(List admins) {
        this.admins = admins;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy