gpt4 book ai didi

org.ogema.core.security.WebAccessManager类的使用及代码示例

转载 作者:知者 更新时间:2024-03-27 10:11:05 26 4
gpt4 key购买 nike

本文整理了Java中org.ogema.core.security.WebAccessManager类的一些代码示例,展示了WebAccessManager类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebAccessManager类的具体详情如下:
包路径:org.ogema.core.security.WebAccessManager
类名称:WebAccessManager

WebAccessManager介绍

暂无

代码示例

代码示例来源:origin: org.ogema.widgets/reveal-base

@Override
public void start(ApplicationManager appManager) {
  this.appMan = appManager;
  try {
    appManager.getWebAccessManager().registerWebResource(BROWSER_PATH, RESOURCE_PATH);
  } catch (Exception e) {
    appManager.getWebAccessManager().unregisterWebResource(BROWSER_PATH);
    appManager.getWebAccessManager().registerWebResource(BROWSER_PATH, RESOURCE_PATH);
  } finally {
    appManager.getWebAccessManager().registerStartUrl(null);
  }
}

代码示例来源:origin: org.ogema.widgets/widget-collection

@Override
public void downloadCompleted() {
  wam.unregisterWebResourcePath(path);
  active.set(false);
}

代码示例来源:origin: org.ogema.widgets/ogema-js-bundle

@Override
public void start(ApplicationManager am) {
  this.am = am;
  this.wam = am.getWebAccessManager();
  wam.registerWebResource("/ogema/jslib", "/org/ogema/tools");
  wam.registerWebResource("/ogema/widget/bricks", "/org/ogema/widget/html/bricks");
  wam.registerWebResource("/ogema/widget/fragment", "/org/ogema/widget/html/fragment");
  wam.registerWebResource("/ogema/widget/images", "/org/ogema/img");
  wam.registerWebResource("/org/ogema/localisation/service", "/org/ogema/localisation/service");
  wam.registerWebResource("/ogema/widget/apps", new AppsServlet(am, permMan));
  wam.registerStartUrl(null);
  widgetService = new OgemaOsgiWidgetServiceImpl(permMan.getAccessManager());
  wam.registerWebResource("/ogema/widget/servlet" , widgetService);
  this.sreg = ctx.registerService(WidgetAdminService.class, widgetService, null);
}

代码示例来源:origin: org.ogema.ref-impl/framework-administration

public void unregister(WebAccessManager wam) {
  wam.unregisterWebResource("/admin");
  wam.unregisterWebResource("/install");
}

代码示例来源:origin: org.ogema.ref-impl/framework-administration

public void register(WebAccessManager wam) {
  wam.registerWebResource("/admin", "/admin");
  wam.registerWebResource("/install", this);
}

代码示例来源:origin: org.ogema.widgets/widget-collection

if (webPath != null) {
  try {
    wam.unregisterWebResource(webPath);
  } catch (Exception e) {
    LoggerFactory.getLogger(getClass()).error("Could not unregister old servlet " + e);
    webPath = wam.registerWebResourcePath(webPath, servlet);
  } else {
    if (!customWebPathRegistered) {
      webPath = customWebPath;
      webPath = wam.registerWebResourcePath(webPath, servlet);
      customWebPathRegistered = true;

代码示例来源:origin: org.ogema.tools/grafana-base

@Override
public void start(ApplicationManager am) {
  this.am = am;
  String packagePath = "org/ogema/tools/grafana/base/grafana-1.9.1";
  WEB_RES_PATH = am.getWebAccessManager().registerWebResourcePath("", packagePath);
  APP_STARTTIME = am.getFrameworkTime();
  //    	WEB_RES_PATH = am.getWebAccessManager().registerWebResource("/org/ogema/tools/grafana-base" , packagePath);      
  am.getLogger().debug("Grafana base resources registered under " + WEB_RES_PATH);
  am.getWebAccessManager().registerStartUrl(null); // remove app from framework GUI
}

代码示例来源:origin: org.ogema.tools/app-collections-api

if (sn.equals(bsn)) {
  a=aa;
  if (aa.getWebAccess().getStartUrl() != null) // otherwise continue searching; there may be multiple apps per bundle
    break;

代码示例来源:origin: org.ogema.widgets/ogema-js-bundle

wam.registerStartUrl(pageUrl);
getWidgetService().createPageRegistration(page, wam);
return staticRegistration;

代码示例来源:origin: org.ogema.ref-impl/framework-administration

final Map<String, String> registeredResources = app.getWebAccess().getRegisteredResources();
if ((registeredResources == null || registeredResources.isEmpty()) && app.getWebAccess().getStartUrl() == null) {
  continue;

代码示例来源:origin: org.ogema.widgets/widget-collection

final void init(boolean multiUpload) {
  this.multiUpload = multiUpload;
  servlet = new FileUploadServlet(this, multiUpload, appMan);
  servletPath = "/upload/" + nextSessionId();
  servletPath = appMan.getWebAccessManager().registerWebResourcePath(servletPath, servlet);
}

代码示例来源:origin: org.ogema.widgets/ogema-js-bundle

/**
 * Register page on app.
 *
 * @param page
 * @return
 */
@SuppressWarnings("rawtypes")
public boolean registerFallback(WidgetPageBase<?> page, boolean setAsStartPage) {
  String relativeUrl = page.getUrl();
  String pageUrl = htmlPath + "/" + relativeUrl;
  synchronized (pages) {
    if (pages.containsKey(relativeUrl))
      throw new IllegalStateException("Page with url " + pageUrl + " already registered");
    if (page instanceof ServletBasedWidgetPage) {
      wam.registerWebResource(pageUrl, ((ServletBasedWidgetPage<?>) page).getServlet());
      LoggerFactory.getLogger(JsBundleApp.class).info("Page registered under " + pageUrl);
    }
    // register page
    pages.put(relativeUrl, page);
  }
  if (setAsStartPage)
    wam.registerStartUrl(pageUrl);
  getWidgetService().createPageRegistration(page, wam);
  return true;
}

代码示例来源:origin: org.ogema.widgets/widget-collection

@Override
public void stop(AppStopReason asr) {
  wam.unregisterWebResource("/ogema/widget/html");
  wam.unregisterWebResource("/ogema/widget/button");
  wam.unregisterWebResource("/ogema/widget/label");
  wam.unregisterWebResource("/ogema/widget/datepicker");
  wam.unregisterWebResource("/ogema/widget/slider");
  wam.unregisterWebResource("/ogema/widget/textfield");
  wam.unregisterWebResource("/ogema/widget/dropdown");
  wam.unregisterWebResource("/ogema/widget/checkbox");
  wam.unregisterWebResource("/ogema/widget/alert");
  wam.unregisterWebResource("/ogema/widget/complextable");
  wam.unregisterWebResource("/ogema/widget/complextable2");
  wam.unregisterWebResource("/ogema/widget/accordion");
  wam.unregisterWebResource("/ogema/widget/buttonrow");
  wam.unregisterWebResource("/ogema/widget/popup");
  wam.unregisterWebResource("/ogema/widget/dragdropassign");
  wam.unregisterWebResource("/ogema/widget/datatable");
  wam.unregisterWebResource("/ogema/widget/textarea");
  wam.unregisterWebResource("/ogema/widget/multiselect");
  wam.unregisterWebResource("/ogema/widget/buttonconfirm");
  wam.unregisterWebResource("/ogema/widget/emptywidget");
  wam.unregisterWebResource("/ogema/widget/icon");
  wam.unregisterWebResource("/ogema/widget/autocomplete");
  wam.unregisterWebResource("/ogema/widget/html5");
  wam.unregisterWebResource("/ogema/widget/listgroup");
  wam.unregisterWebResource("/ogema/widget/minified");
}

代码示例来源:origin: org.smartrplace.tools/smartrplace-servlet-context

@Override
public void start(ApplicationManager appManager) {
  this.appMan = appManager;
  appManager.getWebAccessManager().registerWebResource(ServletConstants.APP_AUTH_SERVLET, this);
  this.ownReg = ctx.registerService(AppAuthentication.class, this, null);
}

代码示例来源:origin: org.ogema.tools/app-collections-api

@Override
  public Boolean run() {
    final AdministrationManager admin = am.getAdministrationManager();
    final List<AdminApplication> allApps = admin.getAllApps();
    final List<String> foundApps = new ArrayList<>();
    synchronized (validApps) {
      for (String bsn : bundleSymbolicNames) {
        AdminApplication a  = null;
        for (AdminApplication aa : allApps) {
          final String sn = getSymbolicName(aa);
          if (sn == null || validApps.containsKey(sn))
            continue;
          if (bsn.equals(sn)) {
            a = aa;
            if (aa.getWebAccess().getStartUrl() != null) // otherwise continue searching; there may be multiple apps per bundle
              break;
          }
        }
        if (a == null)
          continue;
        validApps.put(bsn, a);
        foundApps.add(bsn);
      }
    }
    boolean success = foundApps.size() == bundleSymbolicNames.length;
    if (!success)
      logger.debug("Found only {} out of {} apps",foundApps.size(),bundleSymbolicNames.length);
    return success;
  }
});

代码示例来源:origin: org.ogema.widgets/widget-collection

consumer != null ? new DownloadServlet(consumer, reusable, contentType, appMan, listeners) :
      new DownloadServlet(outputConsumer, reusable, contentType, appMan, listeners, true);
this.url = appMan.getWebAccessManager().registerWebResourcePath(webPath, servlet);
if (customFilename != null)
  url += "/" + customFilename;

代码示例来源:origin: org.ogema.widgets/widget-collection

wam.registerBasicResource("/ogema/widget/minified", "de/iwes/widgets/html/minified");
} catch (NoClassDefFoundError | ClassCastException e) {  // fallback for OGEMA v < 2.1.2
  wam.registerWebResource("/ogema/widget/alert", getPackageResourceReferenz(Alert.class));
   wam.registerWebResource("/ogema/widget/button", getPackageResourceReferenz(Button.class));
   wam.registerWebResource("/ogema/widget/label", getPackageResourceReferenz(Label.class));
   wam.registerWebResource("/ogema/widget/slider", getPackageResourceReferenz(Slider.class));
   wam.registerWebResource("/ogema/widget/datepicker", getPackageResourceReferenz(Datepicker.class));
   wam.registerWebResource("/ogema/widget/textfield", getPackageResourceReferenz(TextField.class));
   wam.registerWebResource("/ogema/widget/dropdown", getPackageResourceReferenz(Dropdown.class));
   wam.registerWebResource("/ogema/widget/checkbox", getPackageResourceReferenz(Checkbox.class));
   wam.registerWebResource("/ogema/widget/complextable", getPackageResourceReferenz((Class) DynamicTable.class));
   wam.registerWebResource("/ogema/widget/complextable2", getPackageResourceReferenz((Class) DynamicTable2.class));
   wam.registerWebResource("/ogema/widget/accordion", getPackageResourceReferenz(Accordion.class));
   wam.registerWebResource("/ogema/widget/buttonrow", getPackageResourceReferenz(ConfigButtonRow.class));
   wam.registerWebResource("/ogema/widget/popup", getPackageResourceReferenz(Popup.class));
   wam.registerWebResource("/ogema/widget/filedownload", getPackageResourceReferenz(FileDownload.class));
   wam.registerWebResource("/ogema/widget/fileupload", getPackageResourceReferenz(FileUpload.class));
   wam.registerWebResource("/ogema/widget/dragdropassign", getPackageResourceReferenz(DragDropAssign.class));
   wam.registerWebResource("/ogema/widget/datatable", getPackageResourceReferenz(DataTable.class));
   wam.registerWebResource("/ogema/widget/textarea", getPackageResourceReferenz(TextArea.class));
   wam.registerWebResource("/ogema/widget/multiselect", getPackageResourceReferenz(Multiselect.class));
   wam.registerWebResource("/ogema/widget/buttonconfirm", getPackageResourceReferenz(ButtonConfirm.class));
   wam.registerWebResource("/ogema/widget/emptywidget", getPackageResourceReferenz(EmptyWidget.class)); // experimental
   wam.registerWebResource("/ogema/widget/icon", getPackageResourceReferenz(Icon.class)); // experimental
   wam.registerWebResource("/ogema/widget/autocomplete", getPackageResourceReferenz(Autocomplete.class)); // experimental
   wam.registerWebResource("/ogema/widget/html5", getPackageResourceReferenz(Meter.class));
   wam.registerWebResource("/ogema/widget/listgroup", getPackageResourceReferenz((Class) ListGroup.class));

代码示例来源:origin: org.ogema.widgets/widget-collection

@Override
protected void finalize() {
  if (webPath != null) { //Only unregister if registered
    wam.unregisterWebResource(webPath);
  }
  try {
    super.finalize();
  } catch (Throwable ex) {
    LoggerFactory.getLogger(FileDownloadData.class).error(ex.toString());
  }
}

代码示例来源:origin: org.ogema.widgets/ogema-js-bundle

public PageRegistrationI createPageRegistration(WidgetPageBase<?> page, WebAccessManager wam) {
  String boundPagePath = page.getServletBase();
  PageRegistrationI pr = registeredPages.get(boundPagePath);
  if (pr == null) {
    synchronized (registeredPages) {
      pr = registeredPages.get(boundPagePath);
      if (pr == null) {
        if (page instanceof LazyPage<?>) {
          pr = new LazyPageRegistration((LazyPage) page, sessionManagement, accessManager, page.getApp());
        }
        else {
          pr = new PageRegistration(page, sessionManagement, accessManager);
        }
        wam.registerWebResource(boundPagePath, pr);
        registeredPages.put(boundPagePath, pr);
      }
    }
  }
  return pr;
}

代码示例来源:origin: org.ogema.widgets/ogema-js-bundle

final String baseUrl = permissionManager.getWebAccess(appid).getStartUrl();
if (baseUrl == null)
  return null;

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com