Tabnine Logo
ServiceInfoImpl.setId
Code IndexAdd Tabnine to your IDE (free)

How to use
setId
method
in
org.geoserver.config.impl.ServiceInfoImpl

Best Java code snippets using org.geoserver.config.impl.ServiceInfoImpl.setId (Showing top 6 results out of 315)

origin: geoserver/geoserver

@Test
public void testAddService() throws Exception {
  ServiceInfo service = geoServer.getFactory().createService();
  service.setName("foo");
  geoServer.add(service);
  ServiceInfo s2 = geoServer.getFactory().createService();
  ((ServiceInfoImpl) s2).setId(service.getId());
  try {
    geoServer.add(s2);
    fail("adding service with duplicate id should throw exception");
  } catch (Exception e) {
  }
  ServiceInfo s = geoServer.getServiceByName("foo", ServiceInfo.class);
  assertTrue(s != service);
  assertEquals(service, s);
}
origin: geoserver/geoserver

@Test
public void testModifyService() throws Exception {
  ServiceInfo service = geoServer.getFactory().createService();
  ((ServiceInfoImpl) service).setId("id");
  service.setName("foo");
  service.setTitle("bar");
  geoServer.add(service);
  ServiceInfo s1 = geoServer.getServiceByName("foo", ServiceInfo.class);
  s1.setTitle("changed");
  ServiceInfo s2 = geoServer.getServiceByName("foo", ServiceInfo.class);
  assertEquals("bar", s2.getTitle());
  geoServer.save(s1);
  s2 = geoServer.getServiceByName("foo", ServiceInfo.class);
  assertEquals("changed", s2.getTitle());
}
origin: org.geoserver/gs-gwc

public GwcServiceProxy() {
  serviceInfo = new ServiceInfoImpl();
  serviceInfo.setId("gwc");
  serviceInfo.setName("gwc");
  serviceInfo.setEnabled(true);
  serviceInfo.setVersions(ImmutableList.of(new Version("1.0.0")));
  gwcDispatcher = GeoWebCacheExtensions.bean(GeoWebCacheDispatcher.class);
}
origin: org.geoserver/gwc

public GwcServiceProxy() {
  serviceInfo = new ServiceInfoImpl();
  serviceInfo.setId("gwc");
  serviceInfo.setName("gwc");
  serviceInfo.setEnabled(true);
  serviceInfo.setVersions(ImmutableList.of(new Version("1.0.0")));
  gwcDispatcher = GeoWebCacheExtensions.bean(GeoWebCacheDispatcher.class);
}
origin: org.geoserver.web/gs-web-core

  ServiceInfo create() {
    // create it
    GeoServer gs = GeoServerApplication.get().getGeoServer();
    ServiceInfo newService = gs.getFactory().create(serviceClass);
    // initialize from global service
    ServiceInfo global = gs.getService(serviceClass);
    OwsUtils.copy(global, newService, serviceClass);
    newService.setWorkspace(wsModel.getObject());
    // hack, but need id to be null so its considered unattached
    ((ServiceInfoImpl) newService).setId(null);
    return newService;
  }
}
origin: org.geoserver.web/web-core

  ServiceInfo create() {
    //create it
    GeoServer gs = GeoServerApplication.get().getGeoServer();
    
    ServiceInfo newService = gs.getFactory().create(serviceClass);
    //initialize from global service
    ServiceInfo global = gs.getService(serviceClass);
    OwsUtils.copy(global,newService, serviceClass);
    newService.setWorkspace(wsModel.getObject());
    //hack, but need id to be null so its considered unattached
    ((ServiceInfoImpl)newService).setId(null);
    
    return newService;
  }
}
org.geoserver.config.implServiceInfoImplsetId

Popular methods of ServiceInfoImpl

  • equals
  • <init>
  • hashCode
  • setVersions
  • setEnabled
  • setName
  • getClientProperties
  • getExceptionFormats
  • getKeywords
  • getMetadata
  • getVersions
  • setClientProperties
  • getVersions,
  • setClientProperties,
  • setExceptionFormats,
  • setKeywords,
  • setMetadata

Popular in Java

  • Creating JSON documents from java classes using gson
  • getExternalFilesDir (Context)
  • findViewById (Activity)
  • setRequestProperty (URLConnection)
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • String (java.lang)
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now