Package org.apache.juddi.model

Examples of org.apache.juddi.model.Publisher


    EntityManager em = PersistenceManager.getEntityManager();
    EntityTransaction tx = em.getTransaction();
    try {
      tx.begin();
      Publisher publisher = em.find(Publisher.class, authorizedName);
      if (publisher == null)
        throw new UnknownUserException(new ErrorMessage("errors.auth.NoPublisher", authorizedName));
     
      return publisher;
    } finally {
View Full Code Here


  }
 
    public void validateSaveBusinessMax(EntityManager em) throws DispositionReportFaultMessage {
   
    //Obtain the maxSettings for this publisher or get the defaults
    Publisher publisher = em.find(Publisher.class, getPublisher().getAuthorizedName());
    Integer maxBusinesses = publisher.getMaxBusinesses();
    try {
      if (maxBusinesses==null) {
        if (AppConfig.getConfiguration().containsKey(Property.JUDDI_MAX_BUSINESSES_PER_PUBLISHER)) {
          maxBusinesses = AppConfig.getConfiguration().getInteger(Property.JUDDI_MAX_BUSINESSES_PER_PUBLISHER, -1);
        } else {
View Full Code Here

  }
 
  public void validateSaveServiceMax(EntityManager em, String businessKey) throws DispositionReportFaultMessage {
   
    //Obtain the maxSettings for this publisher or get the defaults
    Publisher publisher = em.find(Publisher.class, getPublisher().getAuthorizedName());
    Integer maxServices = publisher.getMaxBusinesses();
    try {
      if (maxServices==null) {
        if (AppConfig.getConfiguration().containsKey(Property.JUDDI_MAX_SERVICES_PER_BUSINESS)) {
          maxServices = AppConfig.getConfiguration().getInteger(Property.JUDDI_MAX_SERVICES_PER_BUSINESS, -1);
        } else {
View Full Code Here

  }
 
  public void validateSaveBindingMax(EntityManager em, String serviceKey) throws DispositionReportFaultMessage {
   
    //Obtain the maxSettings for this publisher or get the defaults
    Publisher publisher = em.find(Publisher.class, getPublisher().getAuthorizedName());
    Integer maxBindings = publisher.getMaxBindingsPerService();
    try {
      if (maxBindings==null) {
        if (AppConfig.getConfiguration().containsKey(Property.JUDDI_MAX_BINDINGS_PER_SERVICE)) {
          maxBindings = AppConfig.getConfiguration().getInteger(Property.JUDDI_MAX_BINDINGS_PER_SERVICE, -1);
        } else {
View Full Code Here

  }
 
  public void validateSaveTModelMax(EntityManager em) throws DispositionReportFaultMessage {
   
    //Obtain the maxSettings for this publisher or get the defaults
    Publisher publisher = em.find(Publisher.class, getPublisher().getAuthorizedName());
    Integer maxTModels = publisher.getMaxTmodels();
    try {
      if (maxTModels==null) {
        if (AppConfig.getConfiguration().containsKey(Property.JUDDI_MAX_TMODELS_PER_PUBLISHER)) {
          maxTModels = AppConfig.getConfiguration().getInteger(Property.JUDDI_MAX_TMODELS_PER_PUBLISHER, -1);
        } else {
View Full Code Here

        if (isLdapUser) {
            EntityManager em = PersistenceManager.getEntityManager();
            EntityTransaction tx = em.getTransaction();
            try {
                tx.begin();
                Publisher publisher = em.find(Publisher.class, authorizedName);
                if (publisher == null) {
                    logger.warn("Publisher was not found, adding the publisher in on the fly.");
                    publisher = new Publisher();
                    publisher.setAuthorizedName(authorizedName);
                    publisher.setIsAdmin("false");
                    publisher.setIsEnabled("true");
                    publisher.setMaxBindingsPerService(199);
                    publisher.setMaxBusinesses(100);
                    publisher.setMaxServicesPerBusiness(100);
                    publisher.setMaxTmodels(100);
                    publisher.setPublisherName("Unknown");
                    em.persist(publisher);
                    tx.commit();
                }
            } finally {
                if (tx.isActive()) {
View Full Code Here

    public UddiEntityPublisher identify(String authInfo, String authorizedName) throws AuthenticationException, FatalErrorException {
        EntityManager em = PersistenceManager.getEntityManager();
        EntityTransaction tx = em.getTransaction();
        try {
            tx.begin();
            Publisher publisher = em.find(Publisher.class, authorizedName);
            if (publisher == null)
                throw new UnknownUserException(new ErrorMessage("errors.auth.NoPublisher", authorizedName));
            return publisher;
        } finally {
            if (tx.isActive()) {
View Full Code Here

        if (isLdapUser) {
            EntityManager em = PersistenceManager.getEntityManager();
            EntityTransaction tx = em.getTransaction();
            try {
                tx.begin();
                Publisher publisher = em.find(Publisher.class, authorizedName);
                if (publisher == null) {
                    log.warn("Publisher was not found, adding the publisher in on the fly.");
                    publisher = new Publisher();
                    publisher.setAuthorizedName(authorizedName);
                    publisher.setIsAdmin("false");
                    publisher.setIsEnabled("true");
                    publisher.setMaxBindingsPerService(199);
                    publisher.setMaxBusinesses(100);
                    publisher.setMaxServicesPerBusiness(100);
                    publisher.setMaxTmodels(100);
                    publisher.setPublisherName("Unknown");
                    em.persist(publisher);
                    tx.commit();
                }
            } finally {
                if (tx.isActive()) {
View Full Code Here

    public UddiEntityPublisher identify(String authInfo, String authorizedName) throws AuthenticationException, FatalErrorException {
        EntityManager em = PersistenceManager.getEntityManager();
        EntityTransaction tx = em.getTransaction();
        try {
            tx.begin();
            Publisher publisher = em.find(Publisher.class, authorizedName);
            if (publisher == null)
                throw new UnknownUserException(new ErrorMessage("errors.auth.NoPublisher", authorizedName));
            return publisher;
        } finally {
            if (tx.isActive()) {
View Full Code Here

    }
    EntityManager em = PersistenceManager.getEntityManager();
    EntityTransaction tx = em.getTransaction();
    try {
      tx.begin();
      Publisher publisher = em.find(Publisher.class, authorizedName);
      if (publisher == null) {
        log.warn("Publisher was not found, adding the publisher in on the fly.");
        publisher = new Publisher();
        publisher.setAuthorizedName(authorizedName);
        publisher.setIsAdmin("false");
        publisher.setIsEnabled("true");
        publisher.setMaxBindingsPerService(199);
        publisher.setMaxBusinesses(100);
        publisher.setMaxServicesPerBusiness(100);
        publisher.setMaxTmodels(100);
        publisher.setPublisherName("Unknown");
        em.persist(publisher);
        tx.commit();
      }
      return authorizedName;
    } finally {
View Full Code Here

TOP

Related Classes of org.apache.juddi.model.Publisher

Copyright © 2018 www.massapicom. 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.