/*
(non-Javadoc)

@see com.ibm.ws.javaee.ddmodel.wsbnd.WebservicesBnd#getHttpPublishing()
352210
@Override
    public HttpPublishing getHttpPublishing() {
        if (delegate == null) {
            return this.httpPublishing;
        } else {
            return this.httpPublishing == null ? delegate.getHttpPublishing() : this.httpPublishing;
        }
    }
1293120
public ServiceFuture<UserInner> getPublishingUserAsync(final ServiceCallback<UserInner> serviceCallback) {
        return ServiceFuture.fromResponse(getPublishingUserWithServiceResponseAsync(), serviceCallback);
    }
991934
public com.google.api.ads.adwords.axis.v201809.cm.WebpageParameter getParameter() {
        return parameter;
    }
1184592
@Override
    public PubSubOutputHandler getPubSubOutputHandler(SIBUuid8 neighbourUUID)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "getPubSubOutputHandler", neighbourUUID);

        PubSubOutputHandler handler =
                        _pubSubRealization.getPubSubOutputHandler(neighbourUUID);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "getPubSubOutputHandler", handler);

        return handler;
    }
409170
public static PublishRequest createPublishReq(List<PublishElement> list) {
		if (list == null) {
			throw new NullPointerException("list is not allowed to be null");
		}

		PublishRequest ret = createPublishReq();
		for (PublishElement el : list) {
			ret.addPublishElement(el);
		}

		return ret;
	}
1278959
public void actionPublish() throws JspException {

        try {
            boolean isFolder = false;
            if (!isMultiOperation()) {
                if (isDirectPublish()) {
                    isFolder = getCms().readResource(getParamResource(), CmsResourceFilter.ALL).isFolder();
                }
            }
            if (performDialogOperation()) {
                // if no exception is caused and "true" is returned publish operation was successful
                if (isMultiOperation() || isFolder) {
                    // set request attribute to reload the explorer tree view
                    List<String> folderList = new ArrayList<String>();
                    folderList.add(CmsResource.getParentFolder(getResourceList().get(0)));
                    Iterator<String> it = getResourceList().iterator();
                    while (it.hasNext()) {
                        String res = it.next();
                        if (CmsResource.isFolder(res)) {
                            folderList.add(res);
                        }
                    }
                    getJsp().getRequest().setAttribute(REQUEST_ATTRIBUTE_RELOADTREE, folderList);
                }
                actionCloseDialog();
            } else {
                // "false" returned, display "please wait" screen
                getJsp().include(FILE_DIALOG_SCREEN_WAIT);
            }
        } catch (Throwable e) {
            // prepare common message part
            includeErrorpage(this, e);
        }
    }
1191186
private File getPublishLocation(String serviceName, String archiveName, String wsdlLocation) throws IOException
   {
      if (wsdlLocation == null && serviceName == null)
      {
         Loggers.DEPLOYMENT_LOGGER.cannotGetWsdlPublishLocation();
         return null;
      }

      //JBWS-2829: windows issue
      if (archiveName.startsWith("http://"))
      {
         archiveName = archiveName.replace("http://", "http-");
      }

      File locationFile = new File(serverConfig.getServerDataDir().getCanonicalPath() + "/wsdl/" + archiveName);

      if (wsdlLocation != null && wsdlLocation.indexOf(expLocation) >= 0)
      {
         wsdlLocation = wsdlLocation.substring(wsdlLocation.indexOf(expLocation) + expLocation.length());
         return new File(locationFile + "/" + wsdlLocation);
      }
      else if (wsdlLocation != null && !wsdlLocation.startsWith("vfs:"))
      {
         for (String wsdlLocationPrefix : wsdlLocationPrefixes) {
            if (wsdlLocation.startsWith(wsdlLocationPrefix)) {
               return new File(locationFile, encodeLocation(wsdlLocation.substring(wsdlLocationPrefix.length(), wsdlLocation.lastIndexOf("/") + 1)));
            }
         }
         return new File(locationFile, encodeLocation(wsdlLocation));
      }
      else
      {
         return new File(locationFile + "/" + serviceName + ".wsdl");
      }
   }
1193342
public String getPublishButton() {

        String publishButton = OpenCms.getWorkplaceManager().getDefaultUserSettings().getPublishButtonAppearance();
        if (CmsDefaultUserSettings.PUBLISHBUTTON_SHOW_NEVER.equals(publishButton)) {
            return "";
        }

        int buttonStyle = getSettings().getUserSettings().getWorkplaceButtonStyle();

        if (CmsDefaultUserSettings.PUBLISHBUTTON_SHOW_AUTO.equals(publishButton)) {
            if (getCms().isManagerOfProject()) {
                return button(
                    "../../workplace/commons/publish_project.jsp",
                    "body",
                    "publish.png",
                    Messages.GUI_BUTTON_PUBLISH_0,
                    buttonStyle);
            } else {
                return "";
            }
        }

        if (getCms().isManagerOfProject()) {
            return (button(
                "../../workplace/commons/publish_project.jsp",
                "body",
                "publish.png",
                Messages.GUI_BUTTON_PUBLISH_0,
                buttonStyle));
        } else {
            return (button(null, null, "publish_in.png", Messages.GUI_BUTTON_PUBLISH_0, buttonStyle));
        }
    }
990039
public String buildPublishOptions() {

        // show only for direct publish actions
        StringBuffer result = new StringBuffer(128);
        boolean showOptionSiblings = (isMultiOperation()
            || isOperationOnFolder()
            || (isDirectPublish() && hasSiblings() && hasCorrectLockstate()));
        boolean showOptionSubresources = (isMultiOperation() || isOperationOnFolder());

        result.append("<p>");
        if (showOptionSiblings) {
            // show only for multi resource operation or if resource has siblings and correct lock state
            if (!isMultiOperation() && !isOperationOnFolder()) {
                result.append(key(Messages.GUI_DELETE_WARNING_SIBLINGS_0));
                result.append("<br>");
            }
            result.append("<input type='checkbox' name='");
            result.append(PARAM_PUBLISHSIBLINGS);
            result.append("' value='true' onclick=\"reloadReport();\"");
            if (Boolean.valueOf(getParamPublishsiblings()).booleanValue()) {
                result.append(" checked='checked'");
            }
            result.append(">&nbsp;");
            result.append(key(Messages.GUI_PUBLISH_ALLSIBLINGS_0));
            result.append("<br>\n");
        } else {
            result.append("<input type='hidden' name='");
            result.append(PARAM_PUBLISHSIBLINGS);
            result.append("' value='");
            result.append(Boolean.valueOf(getParamPublishsiblings()));
            result.append("'");
            if (Boolean.valueOf(getParamPublishsiblings()).booleanValue()) {
                result.append(" checked='checked'");
            }
            result.append(">\n");
        }
        if (showOptionSubresources) {
            // at least one folder is selected, show "publish subresources" checkbox
            result.append("<input type='checkbox' name='");
            result.append(PARAM_SUBRESOURCES);
            result.append("' value='true' onclick=\"reloadReport();\"");
            if (Boolean.valueOf(getParamSubresources()).booleanValue()) {
                result.append(" checked='checked'");
            }
            result.append(">&nbsp;");
            if (isMultiOperation()) {
                result.append(key(Messages.GUI_PUBLISH_MULTI_SUBRESOURCES_0));
            } else {
                result.append(key(Messages.GUI_PUBLISH_SUBRESOURCES_0));
            }
            result.append("<br>\n");
        } else {
            result.append("<input type='hidden' name='");
            result.append(PARAM_SUBRESOURCES);
            result.append("' value='");
            result.append(Boolean.valueOf(getParamSubresources()));
            result.append("'");
            if (Boolean.valueOf(getParamSubresources()).booleanValue()) {
                result.append(" checked='checked'");
            }
            result.append(">\n");
        }
        // code for the 'publish related resources' button
        boolean disabled = false;
        if ((OpenCms.getWorkplaceManager().getDefaultUserSettings().getPublishRelatedResources() == CmsDefaultUserSettings.PUBLISH_RELATED_RESOURCES_MODE_FORCE)
            && !OpenCms.getRoleManager().hasRole(getCms(), CmsRole.VFS_MANAGER)) {
            disabled = true;
        }
        result.append("<input type='checkbox' name='");
        result.append(PARAM_RELATEDRESOURCES);
        result.append("' value='true' onclick=\"reloadReport();\"");
        if (Boolean.valueOf(getParamRelatedresources()).booleanValue()) {
            result.append(" checked='checked'");
        }
        if (disabled) {
            result.append(" disabled='disabled'");
        }
        result.append(">&nbsp;");
        result.append(key(Messages.GUI_PUBLISH_RELATED_RESOURCES_0));
        result.append("<br>\n");
        result.append("</p>\n");
        return result.toString();
    }
883313
public PubSubMessageItemStream getPublishPoint()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        {
            SibTr.entry(tc, "getPublishPoint");
            SibTr.exit(tc, "getPublishPoint", _pubsubMessageItemStream);
        }

        return _pubsubMessageItemStream;
    }
764376
public java.lang.String getPublic() {
        return (java.lang.String) getStateHelper().eval(PropertyKeys.publicVal);

    }
509515
public PubSubOutputHandler getPubSubOutputHandler(SIBUuid8 neighbourUUID)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "getPubSubOutputHandler", neighbourUUID);

        PubSubOutputHandler handler = null;

        //note that this does not obtain a read lock before attempting the get
        // Get the PubSub Output Handel
        if (_pubsubOutputHandlers != null)
            handler = _pubsubOutputHandlers.get(neighbourUUID);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "getPubSubOutputHandler", handler);

        return handler;
    }
672321
public function isPublishNotEnd(PublishEndReadInterface $object, \DateTimeInterface $currentDate = null)
    {
        $endDate = $object->getPublishEndDate();
        $currentDate = $currentDate ?: new \DateTime();

        return null === $endDate || $currentDate < $endDate;
    }
814198
@Override
    public Publisher<List<String>> getServiceIds() {
        ServiceFilter serviceFilter = new ServiceFilter().withName("NAMESPACE_ID").withValues(getRoute53ClientDiscoveryConfiguration().getNamespaceId());
        ListServicesRequest listServicesRequest = new ListServicesRequest().withFilters(serviceFilter);
        Future<ListServicesResult> response = getDiscoveryClient().listServicesAsync(listServicesRequest);
        Flowable<ListServicesResult> flowableList = Flowable.fromFuture(response);
        return flowableList.flatMap(this::convertServiceIds);
    }
43003
public Server onpublish(Action<Map<String, Object>> action) {
    publishActions.add(action);
    return this;
  }
543233
@Override
    public WebserviceEndpoint getWebserviceEndpoint(String portComponentName) {
        if (portComponentName == null)
            return null;
        WebserviceEndpoint returnValue = webserviceEndpointTypeMap.get(portComponentName);

        if (returnValue == null && delegate != null)
            return delegate.getWebserviceEndpoint(portComponentName);

        return returnValue;
    }
755054
public <T> FutureStream<T> fromPublisher(final Publisher<? extends T> publisher) {
        Objects.requireNonNull(publisher);
        Publisher<T> narrowed = (Publisher<T>)publisher;
        return fromStream(Spouts.from(narrowed));
    }