Permalink
Browse files

Remove unused classes

  • Loading branch information...
1 parent a603d8b commit de6ef5ccde9a9d41060ca93a7d33f493a00684ee Emmanuel Venisse committed May 1, 2008
@@ -1,207 +0,0 @@
-package org.apache.continuum.store.api;
-
-import java.util.List;
-
-import org.apache.continuum.model.project.Schedule;
-import org.apache.continuum.model.system.Installation;
-import org.apache.continuum.model.system.Profile;
-import org.apache.continuum.model.system.SystemConfiguration;
-
-/**
- * Defines the contract consisting of operations that can be performed on following entities:
- * <ul>
- * <li>{@link Schedule},</li>
- * <li>{@link Profile},</li>
- * <li>{@link Installation},</li>
- * <li>{@link SystemConfiguration}</li>
- * </ul>
- *
- * @author <a href='mailto:rahul.thakur.xdev@gmail.com'>Rahul Thakur</a>
- * @version $Id$
- * @since 1.1
- */
-public interface DeprecatedSystemStore
-{
- public static final String ROLE = DeprecatedSystemStore.class.getName();
-
- /**
- * Removes the passed {@link Installation} instance from the underlying store.
- *
- * @param project
- * {@link Installation} instance to remove.
- * @throws StoreException
- * if there was an error removing the entity.
- */
- public void deleteInstallation( Installation installation ) throws StoreException;
-
- /**
- * Removes the passed {@link Profile} instance from the underlying store.
- *
- * @param project
- * {@link Profile} instance to remove.
- * @throws StoreException
- * if there was an error removing the entity.
- */
- public void deleteProfile( Profile profile ) throws StoreException;
-
- /**
- * Removes the passed {@link Schedule} instance from the underlying store.
- *
- * @param project
- * {@link Schedule} instance to remove.
- * @throws StoreException
- * if there was an error removing the entity.
- */
- public void deleteSchedule( Schedule schedule ) throws StoreException;
-
- /**
- * Removes the passed {@link SystemConfiguration} instance from the underlying store.
- *
- * @param project
- * {@link SystemConfiguration} instance to remove.
- * @throws StoreException
- * if there was an error removing the entity.
- */
- public void deleteSystemConfiguration( SystemConfiguration systemConfiguration ) throws StoreException;
-
- /**
- * Looks up the underlying store and returns a {@link Installation} instance that matches the specified id.
- *
- * @param id
- * {@link Installation} id to match.
- * @return matching {@link Installation} instance.
- * @throws EntityNotFoundException
- * if the instance could not be looked up.
- * @throws StoreException
- */
- public Installation lookupInstallation( long id ) throws EntityNotFoundException, StoreException;
-
- /**
- * Looks up the underlying store and returns a {@link Profile} instance that matches the specified id.
- *
- * @param id
- * {@link Profile} id to match.
- * @return matching {@link Profile} instance.
- * @throws EntityNotFoundException
- * if the instance could not be looked up.
- * @throws StoreException
- */
- public Profile lookupProfile( long id ) throws EntityNotFoundException, StoreException;
-
- /**
- * Looks up the underlying store and returns a {@link Schedule} instance that matches the specified id.
- *
- * @param id
- * {@link Schedule} id to match.
- * @return matching {@link Schedule} instance.
- * @throws EntityNotFoundException
- * if the instance could not be looked up.
- * @throws StoreException
- */
- public Schedule lookupSchedule( long id ) throws EntityNotFoundException, StoreException;
-
- /**
- * Looks up the underlying store and returns a {@link SystemConfiguration} instance that matches the specified id.
- *
- * @param id
- * {@link SystemConfiguration} id to match.
- * @return matching {@link SystemConfiguration} instance.
- * @throws EntityNotFoundException
- * if the instance could not be looked up.
- * @throws StoreException
- */
- public SystemConfiguration lookupSystemConfiguration( long id ) throws EntityNotFoundException, StoreException;
-
- /**
- * Persists the passed in {@link Installation} instance to the underlying store.
- * <p>
- * If the entity instance already exists in the database it is updated, else a new instance is created and an
- * store-generated identifier assigned to it.
- *
- * @param project
- * {@link Installation} instance to be created/saved.
- * @return updated {@link Installation} instance.
- * @throws StoreException
- * if there was an error saving the entity.
- */
- public Installation saveInstallation( Installation installation ) throws StoreException;
-
- /**
- * Persists the passed in {@link Profile} instance to the underlying store.
- * <p>
- * If the entity instance already exists in the database it is updated, else a new instance is created and an
- * store-generated identifier assigned to it.
- *
- * @param project
- * {@link Profile} instance to be created/saved.
- * @return updated {@link Profile} instance.
- * @throws StoreException
- * if there was an error saving the entity.
- */
- public Profile saveProfile( Profile profile ) throws StoreException;
-
- /**
- * Persists the passed in {@link Schedule} instance to the underlying store.
- * <p>
- * If the entity instance already exists in the database it is updated, else a new instance is created and an
- * store-generated identifier assigned to it.
- *
- * @param project
- * {@link Schedule} instance to be created/saved.
- * @return updated {@link Schedule} instance.
- * @throws StoreException
- * if there was an error saving the entity.
- */
- public Schedule saveSchedule( Schedule schedule ) throws StoreException;
-
- /**
- * Persists the passed in {@link SystemConfiguration} instance to the underlying store.
- * <p>
- * If the entity instance already exists in the database it is updated, else a new instance is created and an
- * store-generated identifier assigned to it.
- *
- * @param project
- * {@link SystemConfiguration} instance to be created/saved.
- * @return updated {@link SystemConfiguration} instance.
- * @throws StoreException
- * if there was an error saving the entity.
- */
- public SystemConfiguration saveSystemConfiguration( SystemConfiguration systemConfiguration ) throws StoreException;
-
- /**
- * Obtains and returns a {@link List} of <b>all</b> {@link Schedule} instances for the system, stored in the
- * underlying store.
- *
- * @return list of all {@link Schedule} instances stored.
- * @throws StoreException
- */
- public List getAllSchedules() throws StoreException;
-
- /**
- * Obtains and returns a {@link List} of <b>all</b> {@link Profile} instances for the system, stored in the
- * underlying store.
- *
- * @return list of all {@link Profile} instances stored.
- * @throws StoreException
- */
- public List getAllProfiles() throws StoreException;
-
- /**
- * Obtains and returns a {@link List} of <b>all</b> {@link Installation} instances for the system, stored in the
- * underlying store.
- *
- * @return list of all {@link Installation} instances stored.
- * @throws StoreException
- */
- public List getAllInstallations() throws StoreException;
-
- /**
- * Obtains and returns a {@link List} of <b>all</b> {@link SystemConfiguration} instances for the system, stored in
- * the underlying store.
- *
- * @return list of all {@link SystemConfiguration} instances stored.
- * @throws StoreException
- */
- public List getAllSystemConfigurations() throws StoreException;
-
-}
@@ -1,42 +0,0 @@
-package org.apache.continuum.store.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.
- */
-
-/**
- * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
- * @version $Id$
- */
-public class EntityNotFoundException extends StoreException
-{
- public EntityNotFoundException()
- {
- super();
- }
-
- public EntityNotFoundException( String message )
- {
- super( message );
- }
-
- public EntityNotFoundException( String type, String id )
- {
- this( "Could not find object. Type '" + type + "'. Id: '" + id + "'." );
- }
-}
@@ -1,33 +0,0 @@
-/**
- *
- */
-package org.apache.continuum.store.api;
-
-import java.util.Map;
-
-/**
- * Wraps up Type Query criteria to be used by store extensions to filter (and obtain) matching type instances.
- * <p>
- * Implementations/extensions are expected to override {@link Object#toString()} method and return a <b>JPQL</b>
- * formatted string. The JPQL string is consumed by the {@link Store} implementation in {@link Store#query(Query)}
- * operations.
- *
- * @author <a href='mailto:rahul.thakur.xdev@gmail.com'>Rahul Thakur</a>
- * @version $Id$
- * @since 1.2
- */
-public interface Query<Q>
-{
-
- /**
- * Returns this instance of {@link Query} as a JPQL String.
- *
- * @param whereClause
- * {@link Map} containing the named parameters to be substituted in the JPQL query. This is populated by
- * the {@link Query} implementation and subsequently used by the {@link Store} implementation to
- * interpolate the parameters before the JPQL query is executed.
- *
- * @return {@link Query} as a JPQL String
- */
- public String toString( Map<String, Object> whereClause );
-}
@@ -1,32 +0,0 @@
-/**
- *
- */
-package org.apache.continuum.store.api;
-
-/**
- * @author <a href='mailto:rahul.thakur.xdev@gmail.com'>Rahul Thakur</a>
- * @version $Id$
- * @since 1.2
- */
-public class QueryFactory
-{
- public static <T, Q extends Query<T>> Q createQuery( Class<Q> klass )
- {
- Q qry = null;
- try
- {
- qry = klass.newInstance();
- }
- catch ( InstantiationException e )
- {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- catch ( IllegalAccessException e )
- {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- return qry;
- }
-}
@@ -1,79 +0,0 @@
-/**
- *
- */
-package org.apache.continuum.store.api;
-
-import java.util.List;
-
-import org.apache.continuum.model.CommonUpdatableEntity;
-
-/**
- * Interface that Continuum store extensions/implementations are expected to implement to allow operations on the
- * underlying store.
- * <ul>
- * <li>Entity look ups</li>
- * <li>Entity insert/updates</li>
- * <li>Entity removal</li>
- * <li>Querying one or more entity/entities based on specified criteria</li>
- * </ul>
- *
- * @author <a href='mailto:rahul.thakur.xdev@gmail.com'>Rahul Thakur</a>
- * @version $Id$
- * @since 1.2
- */
-public interface Store<T extends CommonUpdatableEntity, Q extends Query<T>>
-{
-
- /**
- * Looks up the underlying store and returns a {@link T} instance that matches the specified id.
- *
- * @param klass
- * {@link Class} for type entity to lookup and return an instance of.
- * @param id
- * Entity Type {@link T}'s id to match.
- *
- * @return matching entity type {@link T} instance.
- * @throws StoreException
- * @throws EntityNotFoundException
- * if the entity specified by the identifier could be located in the system.
- * @throws EntityNotFoundException
- * if the instance could not be looked up.
- */
- public T lookup( Class<T> klass, Long id ) throws StoreException, EntityNotFoundException;
-
- /**
- * Persists the passed in entity type {@link T} instance to the underlying store.
- * <p>
- * If the entity instance already exists in the database it is updated, else a new instance is created and an
- * store-generated identifier assigned to it.
- *
- * @param entity
- * Type {@link T} instance to be created/saved.
- * @return updated entity type {@link T} instance.
- * @throws StoreException
- * if there was an error saving the entity.
- */
- public T save( T entity ) throws StoreException;
-
- /**
- * Removes the passed entity type {@link T} instance from the underlying store.
- *
- * @param entity
- * Type {@link T} instance to remove.
- * @throws StoreException
- * if there was an error removing the entity.
- */
- public void delete( T entity ) throws StoreException;
-
- /**
- * Obtains a {@link List} of instances of entity type {@link T} which match the criteria specified by the passed in
- * query instance.
- *
- * @param query
- * instance that wraps up the criteria for querying matching instances in the system.
- * @return {@link List} of instances of entity type {@link T} which match the specified query.
- * @throws StoreException
- */
- public List<T> query( Q query ) throws StoreException;
-
-}
Oops, something went wrong.

0 comments on commit de6ef5c

Please sign in to comment.