Giter VIP home page Giter VIP logo

ognl's Introduction

Object-Graph Navigation Language - OGNL

Java CI Coverage Maven Central CII Best Practices License

Note

I recently renamed the master branch into the main branch. If you previously cloned this repository please perform locally update of your clone using the procedure described in Updating a local clone after a branch name changes.

Description

OGNL stands for Object-Graph Navigation Language; it is an expression language for getting and setting properties of Java objects. You use the same expression for both getting and setting the value of a property.

The ognl.Ognl class contains convenience methods for evaluating OGNL expressions. You can do this in two stages, parsing an expression into an internal form and then using that internal form to either set or get the value of a property; or you can do it in a single stage, and get or set a property using the String form of the expression directly.

OGNL started out as a way to set up associations between UI components and controllers using property names. As the desire for more complicated associations grew, Drew Davidson created what he called KVCL, for Key-Value Coding Language, egged on by Luke Blanshard. Luke then reimplemented the language using ANTLR, came up with the new name, and, egged on by Drew, filled it out to its current state. Later on Luke again reimplemented the language using JavaCC. Further maintenance on all the code is done by Drew (with spiritual guidance from Luke).

We pronounce OGNL as a word, like the last syllables of a drunken pronunciation of "orthogonal."

Apache Commons OGNL project

Sometimes ago this project has been migrated to Apache Commons with a plan to maintain it there. Right now that project is considered dead and not actively maintained. There is no plans to release a new version under Apache Software Foundation umbrella and all the future development will happen here.

Commercial Support

The project maintaners are working with Tidelift to provide commercial support and invest paid working time in the improvement of the projects. For more information, visit the Tidelift resources regarding OGNL.

Contributing

If you would like to start contributing to this project please follow the following guidelines:

Even the smallest contribution makes sense, like improving code formatting, fixing a typo documentation. Do not hesitate to ask or report an issue.

FAQ

  • How to define an AccessMember?
    • the best way is to implement your own AccessMember which will suite your project best, you can base on existing DefaultAccessMember and adjust it to your needs. Since version 3.2.16 there is AbstractAccessMemeber which can be used a start point for your own implementation, see the example below:
         MemberAccess memberAccess = new AbstractMemberAccess() {
             @Override
             public boolean isAccessible(Map context, Object target, Member member, String propertyName) {
                 int modifiers = member.getModifiers();
                 return Modifier.isPublic(modifiers);
             }
         };
      
  • How to run OGNL in Google AppEngine?
    • you need to tell OGNL to not do security manager permission checks, which will fail since GAE has a security manager and you don't have the ability to add the OGNL-specific permissions. Therefore, somewhere in your initialization code, add this OgnlRuntime.setSecurityManager(null);.
  • How to use the latest SNAPSHOT version?
    • Define OSS Sonatype repository in ~/.m2/settings.xml as follows:
      <settings>
          <servers>
          ...
          </servers>
          <profiles>
              <profile>
                  <id>local</id>
                  <activation>
                      <activeByDefault>true</activeByDefault>
                  </activation>
                  <repositories>
                      <repository>
                          <id>oss-snapshots</id>
                          <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
                          <layout>default</layout>
                          <snapshots>
                              <enabled>true</enabled>
                          </snapshots>
                      </repository>
                  </repositories>
              </profile>
          </profiles>
      </settings>
      and now you can use SNAPSHOT version of OGNL in your project,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.