QueryAssociatedAzurePublisher.
        [Preview API]
        :param str publisher_name:
        :rtype: :class:`<AzurePublisher> <azure.devops.v5_1.gallery.models.AzurePublisher>`
541371
def query_associated_azure_publisher(self, publisher_name):
        
        route_values = {}
        if publisher_name is not None:
            route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str')
        response = self._send(http_method='GET',
                              location_id='efd202a6-9d87-4ebc-9229-d2b8ae2fdb6d',
                              version='5.1-preview.1',
                              route_values=route_values)
        return self._deserialize('AzurePublisher', response)
871374
def nps_survey_preview(self, id, locale=None, **kwargs):
        ""
        api_path = "/api/v2/nps/surveys/{id}/preview"
        api_path = api_path.format(id=id)
        api_query = {}
        if "query" in kwargs.keys():
            api_query.update(kwargs["query"])
            del kwargs["query"]
        if locale:
            api_query.update({
                "locale": locale,
            })
        return self.call(api_path, query=api_query, **kwargs)
990182
def register_previewer(self, name, previewer):
        """"""
        if name in self.previewers:
            assert name not in self.previewers, \
                "Previewer with same name already registered"
        self.previewers[name] = previewer
        if hasattr(previewer, 'previewable_extensions'):
            self._previewable_extensions |= set(
                previewer.previewable_extensions)
820110
def share_extension(self, publisher_name, extension_name, account_name):
        
        route_values = {}
        if publisher_name is not None:
            route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str')
        if extension_name is not None:
            route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str')
        if account_name is not None:
            route_values['accountName'] = self._serialize.url('account_name', account_name, 'str')
        self._send(http_method='POST',
                   location_id='a1e66d8f-f5de-4d16-8309-91a4e015ee46',
                   version='5.1-preview.1',
                   route_values=route_values)
649317
@Override
	public TopicPublisher createPublisher(Topic topic) throws JMSException
    {
    	externalAccessLock.readLock().lock();
    	try
		{
	        checkNotClosed();
	        LocalTopicPublisher publisher = new LocalTopicPublisher(this,topic,idProvider.createID());
	        registerProducer(publisher);
	        return publisher;
		}
    	finally
    	{
    		externalAccessLock.readLock().unlock();
    	}
    }
471970
public static <T extends Publisher> T getPublisher(AbstractProject<?, ?> project, Class<T> type) {
        // Search for a publisher of the given type in the project and return it if found:
        T publisher = new PublisherFindImpl<T>().find(project, type);
        if (publisher != null) {
            return publisher;
        }
        // If not found, the publisher might be wrapped by a "Flexible Publish" publisher. The below searches for it inside the
        // Flexible Publisher:
        publisher = new PublisherFlexible<T>().find(project, type);
        return publisher;
    }
1211981
def list_consumers(self, publisher_id=None):
        
        query_parameters = {}
        if publisher_id is not None:
            query_parameters['publisherId'] = self._serialize.query('publisher_id', publisher_id, 'str')
        response = self._send(http_method='GET',
                              location_id='4301c514-5f34-4f5d-a145-f0ea7b5b7d19',
                              version='5.0',
                              query_parameters=query_parameters)
        return self._deserialize('[Consumer]', self._unwrap_collection(response))
798260
def get_publisher_name(self, **kwargs):
        """"""
        children = kwargs.get('children', [])
        # Find the creator type in children.
        for child in children:
            if child.tag == 'name':
                return child.content
        return None
855919
def publisher(self, value=None):
        
        if not (value is None):
            if (self.metadatatype == "native"):
                self.metadata['publisher'] = value
            else:
                self._publisher = value
        if (self.metadatatype == "native"):
            if 'publisher' in self.metadata:
                return self.metadata['publisher']
            else:
                return None
        else:
            return self._publisher
1004144
public <T> KxPublisher<T> asKxPublisher(Publisher<T> p) {
        if ( p instanceof KxPublisher)
            return (KxPublisher<T>) p;
        return new KxPublisher<T>() {
            @Override
            public void subscribe(Subscriber<? super T> s) {
                p.subscribe(s);
            }

            @Override @CallerSideMethod
            public KxReactiveStreams getKxStreamsInstance() {
                return KxReactiveStreams.this;
            }
        };
    }
1092902
def authenticate_publish(message)
      if PrivatePub.config[:secret_token].nil?
        raise Error, "No secret_token config set, ensure private_pub.yml is loaded properly."
      elsif message["ext"]["private_pub_token"] != PrivatePub.config[:secret_token]
        message["error"] = "Incorrect token."
      else
        message["ext"]["private_pub_token"] = nil
      end
    end
101328
def has_publish_permission(self, request, obj=None):
        
        permission_name = '{}.publish_{}'.format(self.opts.app_label, self.opts.model_name)
        has_permission = request.user.has_perm(permission_name)

        if obj is not None and has_permission is False:
            has_permission = request.user.has_perm(permission_name, obj=obj)

        return has_permission
309961
def share_extension_with_host(self, publisher_name, extension_name, host_type, host_name):
        
        route_values = {}
        if publisher_name is not None:
            route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str')
        if extension_name is not None:
            route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str')
        if host_type is not None:
            route_values['hostType'] = self._serialize.url('host_type', host_type, 'str')
        if host_name is not None:
            route_values['hostName'] = self._serialize.url('host_name', host_name, 'str')
        self._send(http_method='POST',
                   location_id='328a3af8-d124-46e9-9483-01690cd415b9',
                   version='5.0-preview.1',
                   route_values=route_values)
1270195
def get_api_publisher(self, social_user):
        

        def _post(**kwargs):
            api = self.get_api(social_user)
            response = api.wall.post(**kwargs)
            return response

        return _post
1233817
public static HttpResponse fromPublisher(HttpHeaders headers, Publisher<?> contentPublisher) {
        return fromPublisher(headers, contentPublisher, HttpHeaders.EMPTY_HEADERS, defaultMapper);
    }
1151814
function onPublish( $contentObjectAttribute, $contentObject, $publishedNodes )
    {
        $contentClassAttribute = $contentObjectAttribute->attribute( 'contentclass_attribute' );
        $ret = eZIdentifierType::assignValue( $contentClassAttribute, $contentObjectAttribute );

        return $ret;
    }
1338301
def delete_publisher(self, publisher_name):
        
        route_values = {}
        if publisher_name is not None:
            route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str')
        self._send(http_method='DELETE',
                   location_id='4ddec66a-e4f6-4f5d-999e-9e77710d7ff4',
                   version='5.1-preview.1',
                   route_values=route_values)