Package org.apache.imperius.spl.parser.statements.impl

Examples of org.apache.imperius.spl.parser.statements.impl.SPLPolicy


  public synchronized SPLPolicy getPolicy(String policyName)
      throws SPLException
  {
    if (policyExists(policyName))
    {
      SPLPolicy pol = (SPLPolicy) _policyCache.get(policyName);
      return pol;
    }
    else
    {
      throw new SPLException(
View Full Code Here


  public Object evaluatePolicy(String policyName, Map instances)
      throws SPLException
  {
    logger.entering(sourceClass, Thread.currentThread().getName() + " " + "evaluatePolicy");

    SPLPolicy internalPolicyObject = _policyDataStore.getInternalPolicyObject(policyName);

    Object result = _policyEvaluator.evaluatePolicy(internalPolicyObject, instances);

    logger.exiting(sourceClass, Thread.currentThread().getName() + " " + "evaluatePolicy");
View Full Code Here

    try
    {
      logger.entering(sourceClass, Thread.currentThread().getName() + " " + "createPolicy");

      Object result;
      SPLPolicy cp = _policyDataStore.createSPLPolicyObject(policyName, policyString);
      result = _policyEvaluator.evaluatePolicy(cp, instances);
      if(auditLogger.isLoggable(Level.FINE))
      auditLogger.fine(Thread.currentThread().getName() + " evaluatePolicyString method is invoked :" + policyName);
     
      logger.exiting(sourceClass, Thread.currentThread().getName() + " " + "createPolicy");
View Full Code Here

    if ((policyName != null) && (policyString != null))
    {
      // check if Policy already exists in Repository
      if (!_policyRepository.policyExists(policyName))
      {
        SPLPolicy internalPolicyObject = _policyParser
            .createInternalPolicyObject(policyName, policyString);
        if (internalPolicyObject != null)
        {
          logger
              .fine(Thread.currentThread().getName()
View Full Code Here

    if (policyRuleName != null)
    {
      if (_policyCache.policyExists(policyRuleName))
      {
        // get policy object from cache if exists
        SPLPolicy policyObject = _policyCache.getPolicy(policyRuleName);
     
        logger.exiting(sourceClass, Thread.currentThread().getName()
            + " " + "getInternalPolicyObject");
       
        return policyObject;
      }
      else if (_policyRepository.policyExists(policyRuleName))
      {
        // get policy string from repository
        String PolicyString = _policyRepository
            .getPolicyString(policyRuleName);
       
        // create internal policy object from the policy string
        SPLPolicy internalPolicyObject = _policyParser
            .createInternalPolicyObject(policyRuleName,
                PolicyString);
       
        // insert the policy into internal cache
        _policyCache.insertPolicy(policyRuleName, internalPolicyObject);
View Full Code Here

    if ((policyRuleName != null) && (policyString != null))
    {
      if (_policyRepository.policyExists(policyRuleName))
      {
        // create internal policy from the policy string
        SPLPolicy internalPolicyObject = _policyParser.createInternalPolicyObject(policyRuleName, policyString);
        if (internalPolicyObject != null)
        {
          // update the policy repository
          _policyRepository.updatePolicy(policyRuleName, policyString);
         
View Full Code Here

    if (policyRuleName != null)
    {
      // check if policy exists in cache
      if (_policyCache.policyExists(policyRuleName))
      {
        SPLPolicy policyObject = _policyCache.getPolicy(policyRuleName);
        List importStmtList = policyObject.getImportStmtList();

        logger.exiting(sourceClass, Thread.currentThread().getName()
            + " " + "getPolicyInfo");
       
        PolicyInfo pi = new PolicyInfoImpl(importStmtList);
        return pi;
      }
      else if (_policyRepository.policyExists(policyRuleName))
      {
        String PolicyString = _policyRepository.getPolicyString(policyRuleName);

        SPLPolicy internalPolicyObject = _policyParser.createInternalPolicyObject(policyRuleName, PolicyString);
        _policyCache.insertPolicy(policyRuleName, internalPolicyObject);
       
        List importStmtList = internalPolicyObject.getImportStmtList();
        PolicyInfo pi = new PolicyInfoImpl(importStmtList);

        logger.exiting(sourceClass, Thread.currentThread().getName()
            + " " + "getPolicyInfo");
View Full Code Here

        + "createSPLPolicyObject");

    if ((policyName != null) && (policyString != null))
    {
      // check if Policy already exists in Repository
      SPLPolicy internalPolicyObject = _policyParser
          .createInternalPolicyObject(policyName, policyString);
     
      if (internalPolicyObject != null)
      {
        logger.fine(Thread.currentThread().getName()
View Full Code Here

      String policyRuleName, String policyString) throws SPLException
  {
    logger.entering(sourceClass, Thread.currentThread().getName() + " "
        + "CreateInternalPolicyObject");
    StringReader policyStringReader = new StringReader(policyString);
    SPLPolicy pol = parseFile(policyRuleName, policyStringReader);
   
    logger.exiting(sourceClass, Thread.currentThread().getName() + " "
        + "CreateInternalPolicyObject");
   
    return pol;
View Full Code Here

      {
        logger.log(Level.SEVERE, Messages.SPLOF0007E);
      }

      // do something with the tree
      SPLPolicy pol = doTreeAction(f, parser.getAST(), parser.getTokenNames());
     
      logger.exiting(sourceClass, Thread.currentThread().getName() + " "
          + "parseFile");
     
      return pol;
View Full Code Here

TOP

Related Classes of org.apache.imperius.spl.parser.statements.impl.SPLPolicy

Copyright © 2018 www.massapicom. 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.