Example usage for org.apache.wicket Application getApplicationKeys

List of usage examples for org.apache.wicket Application getApplicationKeys

Introduction

In this page you can find the example usage for org.apache.wicket Application getApplicationKeys.

Prototype

public static Set<String> getApplicationKeys() 

Source Link

Document

Gets the keys of the currently registered Wicket applications for this web application.

Usage

From source file:org.artifactory.webapp.WebappServiceImpl.java

License:Open Source License

@Override
public void rebuildSiteMap() {
    // get the first application key (in aol it will not work!)
    ArtifactoryApplication app = (ArtifactoryApplication) Application
            .get(Application.getApplicationKeys().iterator().next());
    // we must attach the application to the current thread in order to perform wicket operation
    ThreadContext.setApplication(app);//from  www .  j a  va2s  .  c  o  m
    try {
        app.rebuildSiteMap();
    } finally {
        ThreadContext.detach();
    }
}