Examples of FeatureAccessException


Examples of org.ff4j.exception.FeatureAccessException

            // Commit
            sqlConn.commit();

        } catch (SQLException sqlEX) {
            rollback(sqlConn);
            throw new FeatureAccessException("Cannot update features database, SQL ERROR", sqlEX);
        } finally {
            closeStatement(ps);
        }
    }
View Full Code Here

Examples of org.ff4j.exception.FeatureAccessException

        try {
            if (!sqlConn.isClosed()) {
                sqlConn.rollback();
            }
        } catch (SQLException e) {
            throw new FeatureAccessException("Cannot rollback database, SQL ERROR", e);
        }
    }
View Full Code Here

Examples of org.ff4j.exception.FeatureAccessException

                mapFP.get(uid).getPermissions().add(rs.getString(COL_ROLE_ROLENAME));
            }
            return mapFP;

        } catch (SQLException sqlEX) {
            throw new FeatureAccessException("Cannot check feature existence, error related to database", sqlEX);
        } finally {
            closeResultSet(rs);
            closeStatement(ps);
        }
    }
View Full Code Here

Examples of org.ff4j.exception.FeatureAccessException

                    setOFGroup.add(groupName);
                }
            }
            return setOFGroup;
        } catch (SQLException sqlEX) {
            throw new FeatureAccessException("Cannot list groups, error related to database", sqlEX);
        } finally {
            closeResultSet(rs);
            closeStatement(ps);
        }
    }
View Full Code Here

Examples of org.ff4j.exception.FeatureAccessException

            if (rs.next()) {
                return (rs.getInt(1) > 0);
            }
            return false;
        } catch (SQLException sqlEX) {
            throw new FeatureAccessException("Cannot check feature existence, error related to database", sqlEX);
        } finally {
            closeResultSet(rs);
            closeStatement(ps);
        }
    }
View Full Code Here

Examples of org.ff4j.exception.FeatureAccessException

                }
            }
            return mapFP;

        } catch (SQLException sqlEX) {
            throw new FeatureAccessException("Cannot check feature existence, error related to database", sqlEX);
        } finally {
            closeResultSet(rs);
            closeStatement(ps);
        }
    }
View Full Code Here

Examples of org.ff4j.exception.FeatureAccessException

        PreparedStatement ps = null;
        try {
            ps = buildStatement(query, params);
            ps.executeUpdate();
        } catch (SQLException sqlEX) {
            throw new FeatureAccessException("Cannot update features database, SQL ERROR", sqlEX);
        } finally {
            closeStatement(ps);
        }
    }
View Full Code Here

Examples of org.ff4j.exception.FeatureAccessException

        try {
            if (rs != null) {
                rs.close();
            }
        } catch (SQLException e) {
            throw new FeatureAccessException("An error occur when closing resultset", e);
        }
    }
View Full Code Here

Examples of org.ff4j.exception.FeatureAccessException

                    ps.getConnection().close();
                }
                ps.close();
            }
        } catch (SQLException e) {
            throw new FeatureAccessException("An error occur when closing statement", e);
        }
    }
View Full Code Here

Examples of org.zeroexchange.feature.exception.FeatureAccessException

    public Object typeInterceptor(final ProceedingJoinPoint joinPoint) throws Throwable {
        Class featuredClass = joinPoint.getTarget().getClass();
        FeatureMarker marker = (FeatureMarker) featuredClass.getAnnotation(FeatureMarker.class);
        if(!featuresRegistry.isFeatureEnabled(marker.value())) {
            log.error("The feature '" + marker.value() + "' is not enabled");
            throw new FeatureAccessException("The feature '" + marker.value() + "' is not enabled!");
        }

        return joinPoint.proceed();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.