@Override
	public void unpublish(final NodeRef nodeToUnpublish,
			final Map<QName, Serializable> channelProperties) {
    	
        LOG.info("unpublish() invoked...");

		//Getting the httpClient object with authentication header
		final CloseableHttpClient httpclient = publishingHelper.getClosableHttpClient(channelProperties);
		
        try {
			if (LOG.isDebugEnabled()) {
				LOG.debug("Unpublishing node: " + nodeToUnpublish);
			}

			final String uriDelete = publishingHelper.getDeleteURIFromNodeRefAndChannelProperties(
							nodeToUnpublish, channelProperties);
            final HttpDelete httpDelete = new HttpDelete(uriDelete);
            final HttpResponse response = httpclient.execute(httpDelete);

            if (LOG.isDebugEnabled()) {
            	LOG.debug("Response Status: " + response.getStatusLine().getStatusCode() + " - Message: "
                        + response.getStatusLine().getReasonPhrase() + " - NodeRef: " + nodeToUnpublish.toString());
			}
            
			if (response.getStatusLine().getStatusCode() != STATUS_DOCUMENT_DELETED) {
				throw new AlfrescoRuntimeException(response.getStatusLine().getReasonPhrase());
			}
		} catch (IllegalStateException illegalEx) {
			if (LOG.isErrorEnabled()) {
				LOG.error("Exception in Unpublish(): ", illegalEx);
			}
			throw new AlfrescoRuntimeException(illegalEx.getLocalizedMessage());
		} catch (IOException ioex) {
			if (LOG.isErrorEnabled()) {
				LOG.error("Exception in Unpublish(): ", ioex);
			}
			throw new AlfrescoRuntimeException(ioex.getLocalizedMessage());
		} catch (URISyntaxException uriSynEx) {
			if (LOG.isErrorEnabled()) {
				LOG.error("Exception in Unpublish(): ", uriSynEx);
			}
			throw new AlfrescoRuntimeException(uriSynEx.getLocalizedMessage());
		} 
    }