Package org.geoserver.config

Examples of org.geoserver.config.ContactInfo


        wmsInfo.getKeywords().add("k2");
        // @REVISIT: this is not being respected, but the onlineresource is being set based on the
        // proxyBaseUrl... not sure if that's correct
        wmsInfo.setOnlineResource("http://onlineresource/fake");

        ContactInfo contactInfo = new ContactInfoImpl();
        geosInfo.setContact(contactInfo);
        contactInfo.setContactPerson("contactPerson");
        contactInfo.setContactOrganization("contactOrganization");
        contactInfo.setContactPosition("contactPosition");
        contactInfo.setAddress("address");
        contactInfo.setAddressType("addressType");
        contactInfo.setAddressCity("city");
        contactInfo.setAddressState("state");
        contactInfo.setAddressPostalCode("postCode");
        contactInfo.setAddressCountry("country");
        contactInfo.setContactVoice("voice");
        contactInfo.setContactEmail("email");
        contactInfo.setContactFacsimile("fax");

        wmsInfo.setFees("fees");
        wmsInfo.setAccessConstraints("accessConstraints");

        WMSCapsTransformer tr = new WMSCapsTransformer(baseUrl, mapFormats, legendFormats);
View Full Code Here


        }
        if (!(obj instanceof ContactInfo)) {
            return false;
        }

        final ContactInfo other = (ContactInfo) obj;

        if (!(compare(getId(), other.getId())))
            return false;
        if (!(compare(getAddress(), other.getAddress())))
            return false;
        if (!(compare(getAddressCity(), other.getAddressCity())))
            return false;
        if (!(compare(getAddressCountry(), other.getAddressCountry())))
            return false;
        if (!(compare(getAddressPostalCode(), other.getAddressPostalCode())))
            return false;
        if (!(compare(getAddressState(), other.getAddressState())))
            return false;
        if (!(compare(getAddressType(), other.getAddressType())))
            return false;
        if (!(compare(getContactEmail(), other.getContactEmail())))
            return false;
        if (!(compare(getContactFacsimile(), other.getContactFacsimile())))
            return false;
        if (!(compare(getContactOrganization(), other.getContactOrganization())))
            return false;
        if (!(compare(getContactPerson(), other.getContactPerson())))
            return false;
        if (!(compare(getContactPosition(), other.getContactPosition())))
            return false;
        if (!(compare(getContactVoice(), other.getContactVoice())))
            return false;
        if (!(compare(getOnlineResource(), other.getOnlineResource())))
            return false;

        return true;
    }
View Full Code Here

        global2.setTitle("subst'ed global "
                + DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.FULL).format(
                        new Date()));

        global2.setAdminPassword("secret");
        ContactInfo contactInfo = geoServer.getFactory().createContact();
        contactInfo.setAddress("the address");
        contactInfo.setAddressCity("the city");
        global2.setContact(contactInfo);
        geoServer.setGlobal(global2);

        endTransaction();
        startNewTransaction();

        GeoServerInfo globalZ = geoServer.getGlobal();

        String globalDebugDiff = ((GeoServerInfoImplHb) global2).getFirstDiff(globalZ);
        if (globalDebugDiff != null)
            Logging.getLogger(this.getClass()).severe("Globals do not match: " + globalDebugDiff);

        assertEquals(global2, globalZ);

        ContactInfo contactInfoZ = globalZ.getContact();
        assertEquals("Contacts differ", global2.getContact(), contactInfoZ);
        // assertEquals(global2, globalZ);
    }
View Full Code Here

*/
public class GeoServerHomePage extends GeoServerBasePage {

    public GeoServerHomePage() {
        GeoServer gs = getGeoServer();
        ContactInfo contact = gs.getGlobal().getContact();

        //add some contact info
        add(new ExternalLink("contactURL", contact.getOnlineResource())
            .add( new Label("contactName", contact.getContactOrganization())));
        {
            String version = String.valueOf(new ResourceModel("version").getObject());
            String contactEmail = contact.getContactEmail();
            HashMap<String, String>params = new HashMap<String, String>();
            params.put("version", version);
            params.put("contactEmail", contactEmail);
            Label label = new Label("footerMessage", new StringResourceModel("GeoServerHomePage.footer", this, new Model(params)));
            label.setEscapeModelStrings(false);
View Full Code Here

import org.geoserver.web.GeoServerWicketTestSupport;

public class ContactPageTest extends GeoServerWicketTestSupport {

    public void testValues() {
        ContactInfo info = getGeoServerApplication().getGeoServer().getGlobal().getContact();

        login();
        tester.startPage(ContactPage.class);
        tester.assertComponent("form:address", TextField.class);
        tester.assertModelValue("form:address", info.getAddress());
    }
View Full Code Here

        FormTester ft = tester.newFormTester("form");
        ft.setValue("address", "newAddress");
        ft.submit("submit");
        tester.assertRenderedPage(GeoServerHomePage.class);

        ContactInfo info = getGeoServerApplication().getGeoServer().getGlobal().getContact();
        assertEquals("newAddress", info.getAddress());
    }
View Full Code Here

                 * </pre>
                 * </p>
                 *
                 */
            void serviceProvider(GeoServer gs) {
                ContactInfo contact = gs.getGlobal().getContact();
                start("ows:ServiceProvider");

                element("ows:ProviderName", contact.getContactOrganization());
                start( "ows:ServiceContact");
                /*
                <sequence>
                <element ref="ows:IndividualName" minOccurs="0"/>
                <element ref="ows:OrganisationName" minOccurs="0"/>
                <element ref="ows:PositionName" minOccurs="0"/>
                <element ref="ows:ContactInfo" minOccurs="0"/>
                <element ref="ows:Role"/>
                </sequence>
                */
                element( "ows:IndividualName", contact.getContactPerson());
                element( "ows:PositionName", contact.getContactPosition() );

                start( "ows:ContactInfo" );
                /*
                  <sequence>
                        <element name="Phone" type="ows:TelephoneType" minOccurs="0">
                        <element name="Address" type="ows:AddressType" minOccurs="0">
                        <element name="OnlineResource" type="ows:OnlineResourceType" minOccurs="0">
                        <element name="HoursOfService" type="string" minOccurs="0">
                        <element name="ContactInstructions" type="string" minOccurs="0">
                 </sequence>
                 */
                start( "ows:Phone");
                element( "ows:Voice", contact.getContactVoice() );
                element( "ows:Facsimile", contact.getContactFacsimile() );
                end( "ows:Phone");
               
                start( "ows:Address");
                /*
                <element name="DeliveryPoint" type="string" minOccurs="0" maxOccurs="unbounded">
                <element name="City" type="string" minOccurs="0">
                <element name="AdministrativeArea" type="string" minOccurs="0">
                <element name="PostalCode" type="string" minOccurs="0">
                <element name="Country" type="string" minOccurs="0">
                <element name="ElectronicMailAddress" type="string" minOccurs="0" maxOccurs="unbounded">
                 */
                element( "ows:City", contact.getAddressCity() );
                element( "ows:AdministrativeArea", contact.getAddressState() );
                element( "ows:PostalCode", contact.getAddressPostalCode() );
                element( "ows:Country", contact.getAddressCountry() );
                end( "ows:Address" );
               
                end( "ows:ContactInfo" );
               
                end( "ows:ServiceContact");
View Full Code Here

            return true;
        if (obj == null)
            return false;
        if (!(obj instanceof ContactInfo))
            return false;
        final ContactInfo other = (ContactInfo) obj;
        if (address == null) {
            if (other.getAddress() != null)
                return false;
        } else if (!address.equals(other.getAddress()))
            return false;
        if (addressCity == null) {
            if (other.getAddressCity() != null)
                return false;
        } else if (!addressCity.equals(other.getAddressCity()))
            return false;
        if (addressCountry == null) {
            if (other.getAddressCountry() != null)
                return false;
        } else if (!addressCountry.equals(other.getAddressCountry()))
            return false;
        if (addressPostalCode == null) {
            if (other.getAddressPostalCode() != null)
                return false;
        } else if (!addressPostalCode.equals(other.getAddressPostalCode()))
            return false;
        if (addressState == null) {
            if (other.getAddressState() != null)
                return false;
        } else if (!addressState.equals(other.getAddressState()))
            return false;
        if (addressType == null) {
            if (other.getAddressType() != null)
                return false;
        } else if (!addressType.equals(other.getAddressType()))
            return false;
        if (contactEmail == null) {
            if (other.getContactEmail() != null)
                return false;
        } else if (!contactEmail.equals(other.getContactEmail()))
            return false;
        if (contactFacsimile == null) {
            if (other.getContactFacsimile() != null)
                return false;
        } else if (!contactFacsimile.equals(other.getContactFacsimile()))
            return false;
        if (contactOrganization == null) {
            if (other.getContactOrganization() != null)
                return false;
        } else if (!contactOrganization.equals(other.getContactOrganization()))
            return false;
        if (contactPerson == null) {
            if (other.getContactPerson() != null)
                return false;
        } else if (!contactPerson.equals(other.getContactPerson()))
            return false;
        if (contactPosition == null) {
            if (other.getContactPosition() != null)
                return false;
        } else if (!contactPosition.equals(other.getContactPosition()))
            return false;
        if (contactVoice == null) {
            if (other.getContactVoice()!= null)
                return false;
        } else if (!contactVoice.equals(other.getContactVoice()))
            return false;
        if (onlineResource == null) {
            if (other.getOnlineResource() != null)
                return false;
        } else if (!onlineResource.equals(other.getOnlineResource()))
            return false;
        return true;
    }
View Full Code Here

        info.setOnlineResource( get( global, "onlineResource", String.class ) );
        info.setProxyBaseUrl( get( global, "ProxyBaseUrl", String.class ) );
       
        //contact
        Map<String,Object> contact = reader.contact();
        ContactInfo contactInfo = factory.createContact();
      
        contactInfo.setContactPerson( (String) contact.get( "ContactPerson") );
        contactInfo.setContactOrganization( (String) contact.get( "ContactOrganization") );
        contactInfo.setContactVoice( (String) contact.get( "ContactVoiceTelephone" ) );
        contactInfo.setContactFacsimile( (String) contact.get( "ContactFacsimileTelephone" ) );
        contactInfo.setContactPosition( (String) contact.get( "ContactPosition" ) );
        contactInfo.setContactEmail( (String) contact.get( "ContactElectronicMailAddress" ) );
       
        contactInfo.setAddress( (String) contact.get( "Address") );
        contactInfo.setAddressType( (String) contact.get( "AddressType") );
        contactInfo.setAddressCity( (String) contact.get( "City") );
        contactInfo.setAddressCountry( (String) contact.get( "Country") );
        contactInfo.setAddressState( (String) contact.get( "StateOrProvince") );
        contactInfo.setAddressPostalCode( (String) contact.get( "PostCode") );
        info.setContact( contactInfo );
       
        //jai
        JAIInfo jai = new JAIInfoImpl();
        jai.setMemoryCapacity( (Double) value( global.get( "JaiMemoryCapacity"),JAIInfoImpl.DEFAULT_MemoryCapacity ) );
View Full Code Here

            orAtts.addAttribute("", "xlink:href", "xlink:href", "",
                    buildURL(request.getBaseUrl(), "wms", null, URLType.SERVICE));
            element("OnlineResource", null, orAtts);

            GeoServer geoServer = wmsConfig.getGeoServer();
            ContactInfo contact = geoServer.getGlobal().getContact();
            handleContactInfo(contact);

            element("Fees", serviceInfo.getFees());
            element("AccessConstraints", serviceInfo.getAccessConstraints());
            end("Service");
View Full Code Here

TOP

Related Classes of org.geoserver.config.ContactInfo

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.