class UpmsPowerHandler implements PowerHandler {

    static {
        PowerInvoke.registerPowerHandler(UpmsPowerHandler.class);
    }

    @Resource
    private EruptUserService eruptUserService;

    @Override
    public void handler(PowerObject power) {<FILL_FUNCTION_BODY>}

    private boolean powerOff(EruptFunPermissions eruptFunPermissions, Map<String, Boolean> permissionMap) {
        return permissionMap.containsKey(UPMSUtil.getEruptFunPermissionsCode(MetaContext.getErupt().getName(), eruptFunPermissions).toLowerCase());
    }

}

        Map<String, Boolean> permissionMap = eruptUserService.getEruptMenuValuesMap();
        if (power.isAdd()) {
            power.setAdd(powerOff(EruptFunPermissions.ADD, permissionMap));
        }
        if (power.isDelete()) {
            power.setDelete(powerOff(EruptFunPermissions.DELETE, permissionMap));
        }
        if (power.isEdit()) {
            power.setEdit(powerOff(EruptFunPermissions.EDIT, permissionMap));
        }
        if (power.isViewDetails()) {
            power.setViewDetails(powerOff(EruptFunPermissions.VIEW_DETAIL, permissionMap));
        }
        if (power.isExport()) {
            power.setExport(powerOff(EruptFunPermissions.EXPORT, permissionMap));
        }
        if (power.isImportable()) {
            power.setImportable(powerOff(EruptFunPermissions.IMPORTABLE, permissionMap));
        }
    
<no_super_class>