コード例 #1
0
    public synchronized Map<String, Object[]> getParameterMap() {
      if (parameterMap == null) {
        // Two conditions: file upload ("multipart/form-data") or not
        if (getContentType() != null && getContentType().startsWith("multipart/form-data")) {
          // Special handling for multipart/form-data

          // Decode the multipart data
          parameterMap =
              Multipart.getParameterMapMultipart(
                  pipelineContext, request, ServletExternalContext.DEFAULT_FORM_CHARSET_DEFAULT);
        } else if (portletRequest instanceof ResourceRequest) {
          // We encoded query parameters directly into the resource id in this case
          final String queryString =
              NetUtils.getQueryString(((ResourceRequest) portletRequest).getResourceID());
          if (queryString != null)
            parameterMap =
                Collections.unmodifiableMap(
                    StringConversions.stringArrayMapToObjectArrayMap(
                        NetUtils.decodeQueryString(queryString, false)));
          else parameterMap = Collections.emptyMap();
        } else {
          // Not a resource request, so just use native request parameters
          parameterMap = new HashMap<String, Object[]>(portletRequest.getParameterMap());
          parameterMap.remove(WSRPURLRewriter.PathParameterName());
          parameterMap = Collections.unmodifiableMap(parameterMap);
        }
      }
      return parameterMap;
    }
コード例 #2
0
 public Set<String> getControlsStructuralChanges() {
   return controlsStructuralChanges != null
       ? controlsStructuralChanges
       : Collections.<String>emptySet();
 }
コード例 #3
0
 public List<XFormsError.ServerError> getServerErrors() {
   return serverErrors != null ? serverErrors : Collections.<XFormsError.ServerError>emptyList();
 }
コード例 #4
0
 /** Return the list of loads to send to the client, null if none. */
 public List<Load> getLoadsToRun() {
   if (loadsToRun != null) return loadsToRun;
   else return Collections.emptyList();
 }
コード例 #5
0
 public List<Script> getScriptsToRun() {
   if (scriptsToRun != null) return scriptsToRun;
   else return Collections.emptyList();
 }
コード例 #6
0
 public List<DelayedEvent> getDelayedEvents() {
   if (delayedEvents != null) return delayedEvents;
   else return Collections.emptyList();
 }
コード例 #7
0
 /** Return the list of messages to send to the client, null if none. */
 public List<Message> getMessagesToRun() {
   if (messagesToRun != null) return messagesToRun;
   else return Collections.emptyList();
 }
コード例 #8
0
 public Set<String> getPendingUploads() {
   if (pendingUploads == null) return Collections.emptySet();
   else return pendingUploads;
 }
コード例 #9
0
 public Map<String, String[]> getRedirectParameters() {
   return redirectParameters != null
       ? redirectParameters
       : Collections.<String, String[]>emptyMap();
 }