Package org.nasutekds.server.types.operation

Examples of org.nasutekds.server.types.operation.PreParseSearchOperation


      }

      // For search operations:
      if (operation.getOperationType().equals(OperationType.SEARCH))
      {
        PreParseSearchOperation searchOp =
            (PreParseSearchOperation) operation;

        // Check the allowed/prohibited attributes in search filter
        if (!prohibitedAttributes.isEmpty())
        {
          // The attributes specified in prohibitedAttributes are not OK
          allowRequest =
              !containsProhibitedAttribute(searchOp.getRawFilter());
        }

        if (!allowRequest)
        {
          statistics.updateRejectedAttributes();
          messages.add(INFO_ERROR_ATTRIBUTE_NOT_ALLOWED.get());
          return allowRequest;
        }

        if (!allowedAttributes.isEmpty())
        {
          // Only the attributes specified in allowedAttributes are OK
          allowRequest =
              containsOnlyAllowedAttributes(searchOp.getRawFilter());
        }

        if (!allowRequest)
        {
          statistics.updateRejectedAttributes();
          messages.add(INFO_ERROR_ATTRIBUTE_NOT_ALLOWED.get());
          return allowRequest;
        }

        // Check the search scope
        if (!allowedSearchScopes.isEmpty())
        {
          switch (searchOp.getScope())
          {
          case BASE_OBJECT:
            allowRequest =
                allowedSearchScopes.contains(AllowedSearchScopes.BASE);
            break;
View Full Code Here

TOP

Related Classes of org.nasutekds.server.types.operation.PreParseSearchOperation

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.