First, please stay on the mailing list, otherwise we would miss some  
hints from others.

Same situation for me, I have about 900 layers/style sheets which I  
have to configure.

Google "java url tutorial", I found
http://download.oracle.com/javase/tutorial/networking/urls/readingWriting.html
as an example

Some Hints
1)
My java scripts has a "removeWorkspace" method which removes a  
workspace. You have to remove all configuration objects bottom up,  
there is no cascading delete.
2)
The script starts, removes the whole workspaces(s) and recreates the  
whole configuration. I would not try to support delta manipulations.
3)
For REST calls, you must log in as admin. You can use the following  
code  in your startup sequence.

                Authenticator.setDefault(new Authenticator() {
                    protected PasswordAuthentication 
getPasswordAuthentication() {
                        return new PasswordAuthentication (user, 
password.toCharArray());
                    }
                });
4)
Setting the correct connection properties

        void setConnectionProperties(HttpURLConnection connection) {
                connection.setRequestProperty("Content-type", "text/xml");
                connection.setRequestProperty("Accept", "text/xml");
        }


so far, so good
Christian



Quoting Jakub Rojek <[email protected]>:

> Hi,
>
>
> because I have  huge database and thousands of tables in it.I do not  
>  want to publish each of the layer per hand,  because i am lazy. My   
> average data set have over 200 tables and I have quite few of such a  
>  sets.
>
>
> Grüß
>
>
> Kuba
>
>
>
> On Aug 18, 2010, at 12:28 PM, [email protected] wrote:
>
>> If you need a GUI, why do you not use the Geoserver Admin GUI ?
>>
>> REST configuration is useful in scripts and for batch   
>> configurations (that is what I do using Java).
>> Why do you want to create an additional GUI for admin actions ?.
>>
>> Quoting Jakub Rojek <[email protected]>:
>>
>>> Hi,
>>>
>>> I am using REST Configuration Plugin and curl software.  It works   
>>>  pretty smooth. The thing is that i would like to write java   
>>> program  that would do the same as curl, but would have gui for   
>>> the people  that do not really like to write scripts in Shell. Do   
>>> you know how I  can do it?
>>>
>>> Thanks in advance
>>>
>>>
>>> Kuba
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> This SF.net email is sponsored by
>>>
>>> Make an app they can't live without
>>> Enter the BlackBerry Developer Challenge
>>> http://p.sf.net/sfu/RIM-dev2dev
>>> _______________________________________________
>>> Geoserver-users mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>>
>>
>>
>>
>> ----------------------------------------------------------------
>> This message was sent using IMP, the Internet Messaging Program.
>>
>>
>
>



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.



------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to