Examples of IChannelPreferences


Examples of at.molindo.notify.model.IChannelPreferences

    if (channel == null) {
      response.sendError(404);
      return;
    }

    IChannelPreferences prefs = channel.newDefaultPreferences();
    if (prefs instanceof IRequestConfigurable) {
      try {
        Map<?, ?> queryParams = request.getParameterMap();

        for (Map.Entry<?, ?> e : queryParams.entrySet()) {
          Object value = e.getValue();
          if (value != null && value.getClass().isArray()) {
            String[] vals = (String[]) value;
            value = vals.length > 0 ? vals[0] : null;
          }
          ((IRequestConfigurable) prefs).setParam((String) e.getKey(), (String) value);
        }
      } catch (NotifyException e) {
        response.sendError(404);
        return;
      }
    }

    if (channel.getNotificationTypes().contains(Type.PRIVATE) && !channel.isAuthorized(userId, prefs)) {
      response.sendError(403);
    } else if (channel.isConfigured(new Params(prefs.getParams()))) {
      try {
        String output = channel.pull(userId, prefs);
        if (StringUtils.empty(output)) {
          response.sendError(404);
        } else {
View Full Code Here

Examples of at.molindo.notify.model.IChannelPreferences

    IPullChannel channel = getChannel(channelId);
    if (channel == null) {
      return null;
    }

    IChannelPreferences cPrefs = channel.newDefaultPreferences();

    IParams fullParams = new Params().setAll(cPrefs.getParams()).setAll(params);

    StringBuilder buf = new StringBuilder(_baseUrl);
    buf.append(_mountPath).append(_pullPrefix).append(channelId).append("/").append(userId);
    buf.append("?");
    for (final ParamValue pv : fullParams) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.