Author: oching
Date: Wed Oct 8 03:42:03 2008
New Revision: 702801
URL: http://svn.apache.org/viewvc?rev=702801&view=rev
Log:
-added additional service interfaces
-added stub impl of AdministrationService
-configured modello to generate archiva objects used for ws
Added:
archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/maven/archiva/web/xmlrpc/api/AdministrationService.java
archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/maven/archiva/web/xmlrpc/api/SearchService.java
archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/mdo/
archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/mdo/archiva-service.xml
archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/main/java/org/apache/maven/archiva/web/xmlrpc/services/AdministrationServiceImpl.java
Modified:
archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/pom.xml
archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/src/main/java/org/apache/maven/archiva/xmlrpc/security/XmlRpcAuthenticator.java
Modified:
archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/pom.xml
URL:
http://svn.apache.org/viewvc/archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/pom.xml?rev=702801&r1=702800&r2=702801&view=diff
==============================================================================
---
archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/pom.xml
(original)
+++
archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/pom.xml
Wed Oct 8 03:42:03 2008
@@ -37,4 +37,25 @@
<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>
Added:
archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/maven/archiva/web/xmlrpc/api/AdministrationService.java
URL:
http://svn.apache.org/viewvc/archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/maven/archiva/web/xmlrpc/api/AdministrationService.java?rev=702801&view=auto
==============================================================================
---
archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/maven/archiva/web/xmlrpc/api/AdministrationService.java
(added)
+++
archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/maven/archiva/web/xmlrpc/api/AdministrationService.java
Wed Oct 8 03:42:03 2008
@@ -0,0 +1,47 @@
+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;
+
[EMAIL PROTECTED]( "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 );
+}
Added:
archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/maven/archiva/web/xmlrpc/api/SearchService.java
URL:
http://svn.apache.org/viewvc/archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/maven/archiva/web/xmlrpc/api/SearchService.java?rev=702801&view=auto
==============================================================================
---
archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/maven/archiva/web/xmlrpc/api/SearchService.java
(added)
+++
archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/maven/archiva/web/xmlrpc/api/SearchService.java
Wed Oct 8 03:42:03 2008
@@ -0,0 +1,28 @@
+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;
+
[EMAIL PROTECTED]("Search")
+public interface SearchService
+{
+
+}
Added:
archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/mdo/archiva-service.xml
URL:
http://svn.apache.org/viewvc/archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/mdo/archiva-service.xml?rev=702801&view=auto
==============================================================================
---
archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/mdo/archiva-service.xml
(added)
+++
archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/mdo/archiva-service.xml
Wed Oct 8 03:42:03 2008
@@ -0,0 +1,105 @@
+<?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>
Modified:
archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/src/main/java/org/apache/maven/archiva/xmlrpc/security/XmlRpcAuthenticator.java
URL:
http://svn.apache.org/viewvc/archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/src/main/java/org/apache/maven/archiva/xmlrpc/security/XmlRpcAuthenticator.java?rev=702801&r1=702800&r2=702801&view=diff
==============================================================================
---
archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/src/main/java/org/apache/maven/archiva/xmlrpc/security/XmlRpcAuthenticator.java
(original)
+++
archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/src/main/java/org/apache/maven/archiva/xmlrpc/security/XmlRpcAuthenticator.java
Wed Oct 8 03:42:03 2008
@@ -85,6 +85,8 @@
{
try
{
+ //TODO authorization/permissions should be checked depending on
the service being accessed
+
return securitySystem.authorize( session,
ArchivaRoleConstants.GLOBAL_REPOSITORY_MANAGER_ROLE );
}
catch ( AuthorizationException e )
Added:
archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/main/java/org/apache/maven/archiva/web/xmlrpc/services/AdministrationServiceImpl.java
URL:
http://svn.apache.org/viewvc/archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/main/java/org/apache/maven/archiva/web/xmlrpc/services/AdministrationServiceImpl.java?rev=702801&view=auto
==============================================================================
---
archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/main/java/org/apache/maven/archiva/web/xmlrpc/services/AdministrationServiceImpl.java
(added)
+++
archiva/branches/MRM-124/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/src/main/java/org/apache/maven/archiva/web/xmlrpc/services/AdministrationServiceImpl.java
Wed Oct 8 03:42:03 2008
@@ -0,0 +1,83 @@
+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;
+ }
+}