<artifactId>atlassian-xmlrpc-binder-annotations</artifactId>
</dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.modello</groupId>
+ <artifactId>modello-maven-plugin</artifactId>
+ <version>1.0-alpha-15</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>java</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <version>1.0.0</version>
+ <model>src/main/mdo/archiva-service.xml</model>
+ <packageWithVersion>false</packageWithVersion>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</project>
--- /dev/null
+package org.apache.maven.archiva.web.xmlrpc.api;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.util.List;
+
+import com.atlassian.xmlrpc.ServiceObject;
+
+@ServiceObject( "Administration" )
+public interface AdministrationService
+{
+ public boolean executeRepositoryScanner( String repoId );
+
+ public boolean executeDatabaseScanner();
+
+ public List<String> getAllDatabaseConsumers();
+
+ public boolean configureDatabaseConsumer( String consumerId, boolean enable );
+
+ // TODO should we already implement config of consumers per repository?
+ public boolean configureRepositoryConsumer( String repoId, String consumerId, boolean enable );
+
+ public List<String> getAllRepositoryConsumers( String repoId );
+
+ public List<ManagedRepository> getAllManagedRepositories();
+
+ public List<RemoteRepository> getAllRemoteRepositories();
+
+ public boolean deleteArtifact( String repoId, String groupId, String artifactId, String version );
+}
--- /dev/null
+package org.apache.maven.archiva.web.xmlrpc.api;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import com.atlassian.xmlrpc.ServiceObject;
+
+@ServiceObject("Search")
+public interface SearchService
+{
+
+}
--- /dev/null
+<?xml version="1.0" ?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+<model>
+ <id>archiva-client</id>
+ <name>ArchivaClient</name>
+ <version>1.0.0</version>
+ <description>Archiva web services model.</description>
+ <defaults>
+ <default>
+ <key>package</key>
+ <value>org.apache.maven.archiva.web.xmlrpc.api</value>
+ </default>
+ </defaults>
+ <classes>
+ <class>
+ <name>ManagedRepository</name>
+ <version>1.0.0+</version>
+ <description><![CDATA[
+ This class represents a managed repository.
+ ]]></description>
+ <fields>
+ <field>
+ <name>id</name>
+ <version>1.0.0+</version>
+ <required>true</required>
+ <type>String</type>
+ <identifier>true</identifier>
+ </field>
+ <field>
+ <name>name</name>
+ <version>1.0.0+</version>
+ <type>String</type>
+ </field>
+ <field>
+ <name>url</name>
+ <version>1.0.0+</version>
+ <type>String</type>
+ </field>
+ <field>
+ <name>layout</name>
+ <version>1.0.0+</version>
+ <type>String</type>
+ </field>
+ <field>
+ <name>snapshots</name>
+ <version>1.0.0+</version>
+ <type>boolean</type>
+ </field>
+ <field>
+ <name>releases</name>
+ <version>1.0.0+</version>
+ <type>boolean</type>
+ </field>
+ </fields>
+ </class>
+ <class>
+ <name>RemoteRepository</name>
+ <version>1.0.0+</version>
+ <description><![CDATA[
+ This class represents a remote repository.
+ ]]></description>
+ <fields>
+ <field>
+ <name>id</name>
+ <version>1.0.0+</version>
+ <required>true</required>
+ <type>String</type>
+ <identifier>true</identifier>
+ </field>
+ <field>
+ <name>name</name>
+ <version>1.0.0+</version>
+ <type>String</type>
+ </field>
+ <field>
+ <name>url</name>
+ <version>1.0.0+</version>
+ <type>String</type>
+ </field>
+ <field>
+ <name>layout</name>
+ <version>1.0.0+</version>
+ <type>String</type>
+ </field>
+ </fields>
+ </class>
+ </classes>
+</model>
{\r
try\r
{\r
+ //TODO authorization/permissions should be checked depending on the service being accessed\r
+ \r
return securitySystem.authorize( session, ArchivaRoleConstants.GLOBAL_REPOSITORY_MANAGER_ROLE );\r
}\r
catch ( AuthorizationException e )\r
--- /dev/null
+package org.apache.maven.archiva.web.xmlrpc.services;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.util.List;
+
+import org.apache.maven.archiva.web.xmlrpc.api.AdministrationService;
+import org.apache.maven.archiva.web.xmlrpc.api.ManagedRepository;
+import org.apache.maven.archiva.web.xmlrpc.api.RemoteRepository;
+
+public class AdministrationServiceImpl
+ implements AdministrationService
+{
+
+ public boolean configureDatabaseConsumer( String consumerId, boolean enable )
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean configureRepositoryConsumer( String repoId, String consumerId, boolean enable )
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean deleteArtifact( String repoId, String groupId, String artifactId, String version )
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean executeDatabaseScanner()
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean executeRepositoryScanner( String repoId )
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public List<String> getAllDatabaseConsumers()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public List<String> getAllRepositoryConsumers( String repoId )
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public List<ManagedRepository> getAllManagedRepositories()
+ {
+ return null;
+ }
+
+ public List<RemoteRepository> getAllRemoteRepositories()
+ {
+ return null;
+ }
+}