[DS-3003] Ensure all service & DAO implementations have a protected constructor

This commit is contained in:
KevinVdV
2016-01-25 12:31:29 +01:00
parent 8b99d79ab4
commit 9486a7def1
96 changed files with 490 additions and 38 deletions

View File

@@ -85,6 +85,11 @@ public class ItemExportServiceImpl implements ItemExportService
/** log4j logger */
private Logger log = Logger.getLogger(ItemExportServiceImpl.class);
protected ItemExportServiceImpl()
{
}
@Override
public void exportItem(Context c, Iterator<Item> i,

View File

@@ -72,6 +72,10 @@ public class MediaFilterServiceImpl implements MediaFilterService, InitializingB
protected boolean isQuiet = false;
protected boolean isForce = false; // default to not forced
protected MediaFilterServiceImpl()
{
}
@Override
public void afterPropertiesSet() throws Exception {

View File

@@ -33,6 +33,11 @@ public class RequestItemServiceImpl implements RequestItemService {
@Autowired(required = true)
protected RequestItemDAO requestItemDAO;
protected RequestItemServiceImpl()
{
}
@Override
public String createRequest(Context context, Bitstream bitstream, Item item, boolean allFiles, String reqEmail, String reqName, String reqMessage) throws SQLException {
RequestItem requestItem = requestItemDAO.create(context, new RequestItem());

View File

@@ -25,6 +25,11 @@ import java.sql.SQLException;
*/
public class RequestItemDAOImpl extends AbstractHibernateDAO<RequestItem> implements RequestItemDAO
{
protected RequestItemDAOImpl()
{
super();
}
@Override
public RequestItem findByToken(Context context, String token) throws SQLException {
Criteria criteria = createCriteria(context, RequestItem.class);

View File

@@ -69,6 +69,11 @@ public class MetadataExposureServiceImpl implements MetadataExposureService
@Autowired(required = true)
protected AuthorizeService authorizeService;
protected MetadataExposureServiceImpl()
{
}
@Override
public boolean isHidden(Context context, String schema, String element, String qualifier)
throws SQLException

View File

@@ -39,6 +39,11 @@ public class WebAppServiceImpl implements WebAppService {
protected WebAppDAO webAppDAO;
protected WebAppServiceImpl()
{
}
@Override
public WebApp create(Context context, String appName, String url, Date started, int isUI) throws SQLException {
WebApp webApp = webAppDAO.create(context, new WebApp());

View File

@@ -18,5 +18,10 @@ import org.dspace.core.AbstractHibernateDAO;
*
* @author kevinvandevelde at atmire.com
*/
public class WebAppDAOImpl extends AbstractHibernateDAO<WebApp> implements WebAppDAO{
public class WebAppDAOImpl extends AbstractHibernateDAO<WebApp> implements WebAppDAO
{
protected WebAppDAOImpl()
{
super();
}
}

View File

@@ -65,6 +65,10 @@ public class AuthenticationServiceImpl implements AuthenticationService, Initial
@Autowired(required = true)
protected EPersonService ePersonService;
protected AuthenticationServiceImpl()
{
}
@Override
public void afterPropertiesSet() throws Exception {

View File

@@ -34,6 +34,11 @@ public class AuthorityServiceImpl implements AuthorityService{
@Autowired(required = true)
protected List<AuthorityIndexerInterface> indexers;
protected AuthorityServiceImpl()
{
}
@Override
public void indexItem(Context context, Item item) throws SQLException, AuthorizeException {
if(!isConfigurationValid()){

View File

@@ -33,6 +33,10 @@ public class AuthoritySolrServiceImpl implements AuthorityIndexingService, Autho
private static final Logger log = Logger.getLogger(AuthoritySolrServiceImpl.class);
protected AuthoritySolrServiceImpl()
{
}
/**
* Non-Static CommonsHttpSolrServer for processing indexing events.

View File

@@ -35,6 +35,10 @@ public class AuthorityValueServiceImpl implements AuthorityValueService{
@Autowired(required = true)
protected AuthorityTypes authorityTypes;
protected AuthorityValueServiceImpl()
{
}
@Override
public AuthorityValue generate(Context context, String authorityKey, String content, String field) {

View File

@@ -61,6 +61,11 @@ public class AuthorizeServiceImpl implements AuthorizeService
@Autowired(required = true)
protected WorkflowItemService workflowItemService;
protected AuthorizeServiceImpl()
{
}
@Override
public void authorizeAnyOf(Context c, DSpaceObject o, int[] actions)throws AuthorizeException, SQLException
{

View File

@@ -42,10 +42,7 @@ public class ResourcePolicyServiceImpl implements ResourcePolicyService
@Autowired(required = true)
protected ResourcePolicyDAO resourcePolicyDAO;
/**
* Construct an ResourcePolicy
*/
public ResourcePolicyServiceImpl()
protected ResourcePolicyServiceImpl()
{
}

View File

@@ -31,6 +31,11 @@ import java.util.List;
public class ResourcePolicyDAOImpl extends AbstractHibernateDAO<ResourcePolicy> implements ResourcePolicyDAO
{
protected ResourcePolicyDAOImpl()
{
super();
}
@Override
public List<ResourcePolicy> findByDso(Context context, DSpaceObject dso) throws SQLException {
Criteria criteria = createCriteria(context, ResourcePolicy.class);

View File

@@ -37,6 +37,11 @@ public class ChecksumHistoryServiceImpl implements ChecksumHistoryService {
@Autowired(required = true)
protected ChecksumResultService checksumResultService;
protected ChecksumHistoryServiceImpl()
{
}
@Override
public void updateMissingBitstreams(Context context) throws SQLException {
// "insert into checksum_history ( "

View File

@@ -27,6 +27,11 @@ public class ChecksumResultServiceImpl implements ChecksumResultService {
@Autowired(required = true)
private ChecksumResultDAO checksumResultDAO;
protected ChecksumResultServiceImpl()
{
}
/**
* Get the result description for the given result code
*

View File

@@ -40,6 +40,11 @@ public class MostRecentChecksumServiceImpl implements MostRecentChecksumService
@Autowired(required = true)
protected BitstreamService bitstreamService;
protected MostRecentChecksumServiceImpl()
{
}
@Override
public MostRecentChecksum getNonPersistedObject()
{

View File

@@ -34,6 +34,12 @@ import org.hibernate.Query;
*/
public class ChecksumHistoryDAOImpl extends AbstractHibernateDAO<ChecksumHistory> implements ChecksumHistoryDAO
{
protected ChecksumHistoryDAOImpl()
{
super();
}
@Override
public int deleteByDateAndCode(Context context, Date retentionDate, ChecksumResultCode resultCode) throws SQLException {
String hql = "delete from ChecksumHistory where processEndDate < :processEndDate AND checksumResult.resultCode=:resultCode";

View File

@@ -27,6 +27,11 @@ import java.sql.SQLException;
public class ChecksumResultDAOImpl extends AbstractHibernateDAO<ChecksumResult> implements ChecksumResultDAO
{
protected ChecksumResultDAOImpl()
{
super();
}
@Override
public ChecksumResult findByCode(Context context, ChecksumResultCode code) throws SQLException {
Criteria criteria = createCriteria(context, ChecksumResult.class);

View File

@@ -29,7 +29,12 @@ import java.util.List;
*
* @author kevinvandevelde at atmire.com
*/
public class MostRecentChecksumDAOImpl extends AbstractHibernateDAO<MostRecentChecksum> implements MostRecentChecksumDAO {
public class MostRecentChecksumDAOImpl extends AbstractHibernateDAO<MostRecentChecksum> implements MostRecentChecksumDAO
{
protected MostRecentChecksumDAOImpl()
{
super();
}
@Override

View File

@@ -38,6 +38,10 @@ public class BitstreamFormatServiceImpl implements BitstreamFormatService {
@Autowired(required = true)
protected AuthorizeService authorizeService;
protected BitstreamFormatServiceImpl()
{
}
/** translate support-level ID to string. MUST keep this table in sync
* with support level definitions above.

View File

@@ -59,6 +59,10 @@ public class BitstreamServiceImpl extends DSpaceObjectServiceImpl<Bitstream> imp
@Autowired(required = true)
protected BitstreamStorageService bitstreamStorageService;
protected BitstreamServiceImpl()
{
super();
}
@Override
public Bitstream find(Context context, UUID id) throws SQLException {

View File

@@ -53,6 +53,11 @@ public class BundleServiceImpl extends DSpaceObjectServiceImpl<Bundle> implement
@Autowired(required = true)
protected ResourcePolicyService resourcePolicyService;
protected BundleServiceImpl()
{
super();
}
@Override
public Bundle find(Context context, UUID id) throws SQLException
{

View File

@@ -65,6 +65,11 @@ public class CollectionServiceImpl extends DSpaceObjectServiceImpl<Collection> i
protected WorkspaceItemService workspaceItemService;
protected CollectionServiceImpl()
{
super();
}
@Override
public Collection create(Context context, Community community) throws SQLException, AuthorizeException {
return create(context, community, null);

View File

@@ -60,6 +60,12 @@ public class CommunityServiceImpl extends DSpaceObjectServiceImpl<Community> imp
@Autowired(required = true)
protected SiteService siteService;
protected CommunityServiceImpl()
{
super();
}
@Override
public Community create(Community parent, Context context) throws SQLException, AuthorizeException {
return create(parent, context, null);

View File

@@ -51,6 +51,10 @@ public abstract class DSpaceObjectServiceImpl<T extends DSpaceObject> implements
@Autowired(required = true)
protected MetadataAuthorityService metadataAuthorityService;
public DSpaceObjectServiceImpl()
{
}
@Override
public String getName(T dso) {

View File

@@ -44,6 +44,11 @@ public class InstallItemServiceImpl implements InstallItemService
@Autowired(required = true)
protected ItemService itemService;
protected InstallItemServiceImpl()
{
}
@Override
public Item installItem(Context c, InProgressSubmission is)
throws SQLException, AuthorizeException

View File

@@ -75,6 +75,11 @@ public class ItemServiceImpl extends DSpaceObjectServiceImpl<Item> implements It
@Autowired(required = true)
protected VersioningService versioningService;
protected ItemServiceImpl()
{
super();
}
@Override
public Thumbnail getThumbnail(Context context, Item item, boolean requireOriginal) throws SQLException {
Bitstream thumbBitstream;

View File

@@ -40,6 +40,11 @@ public class MetadataFieldServiceImpl implements MetadataFieldService {
@Autowired(required = true)
protected MetadataValueService metadataValueService;
protected MetadataFieldServiceImpl()
{
}
@Override
public MetadataField create(Context context, MetadataSchema metadataSchema, String element, String qualifier, String scopeNote) throws AuthorizeException, SQLException, NonUniqueMetadataException {
// Check authorisation: Only admins may create DC types

View File

@@ -37,6 +37,11 @@ public class MetadataSchemaServiceImpl implements MetadataSchemaService {
@Autowired(required = true)
protected MetadataSchemaDAO metadataSchemaDAO;
protected MetadataSchemaServiceImpl()
{
}
@Override
public MetadataSchema create(Context context, String name, String namespace) throws SQLException, AuthorizeException, NonUniqueMetadataException {
// Check authorisation: Only admins may create metadata schemas

View File

@@ -40,7 +40,7 @@ public class MetadataValueServiceImpl implements MetadataValueService {
@Autowired(required = true)
protected ContentServiceFactory contentServiceFactory;
public MetadataValueServiceImpl() {
protected MetadataValueServiceImpl() {
}

View File

@@ -22,6 +22,10 @@ public class SupervisedItemServiceImpl implements SupervisedItemService
@Autowired(required = true)
protected WorkspaceItemService workspaceItemService;
protected SupervisedItemServiceImpl()
{
}
@Override
public List<WorkspaceItem> getAll(Context context)

View File

@@ -52,6 +52,11 @@ public class WorkspaceItemServiceImpl implements WorkspaceItemService {
protected WorkflowService workflowService;
protected WorkspaceItemServiceImpl()
{
}
@Override
public WorkspaceItem find(Context context, int id) throws SQLException {
WorkspaceItem workspaceItem = workspaceItemDAO.findByID(context, WorkspaceItem.class, id);

View File

@@ -74,6 +74,11 @@ public class MetadataAuthorityServiceImpl implements MetadataAuthorityService
/** fallback default value unless authority.minconfidence = X is configured. */
protected int defaultMinConfidence = Choices.CF_ACCEPTED;
protected MetadataAuthorityServiceImpl()
{
}
public void init() {
if(isAuthorityRequired == null)

View File

@@ -30,7 +30,13 @@ import java.util.List;
*
* @author kevinvandevelde at atmire.com
*/
public class BitstreamDAOImpl extends AbstractHibernateDSODAO<Bitstream> implements BitstreamDAO {
public class BitstreamDAOImpl extends AbstractHibernateDSODAO<Bitstream> implements BitstreamDAO
{
protected BitstreamDAOImpl()
{
super();
}
@Override
public List<Bitstream> findDeletedBitstreams(Context context) throws SQLException {

View File

@@ -26,7 +26,13 @@ import java.util.List;
*
* @author kevinvandevelde at atmire.com
*/
public class BitstreamFormatDAOImpl extends AbstractHibernateDAO<BitstreamFormat> implements BitstreamFormatDAO {
public class BitstreamFormatDAOImpl extends AbstractHibernateDAO<BitstreamFormat> implements BitstreamFormatDAO
{
protected BitstreamFormatDAOImpl()
{
super();
}
/**
* Find a bitstream format by its (unique) MIME type.

View File

@@ -21,7 +21,12 @@ import java.sql.SQLException;
*
* @author kevinvandevelde at atmire.com
*/
public class BundleDAOImpl extends AbstractHibernateDSODAO<Bundle> implements BundleDAO {
public class BundleDAOImpl extends AbstractHibernateDSODAO<Bundle> implements BundleDAO
{
protected BundleDAOImpl()
{
super();
}
@Override

View File

@@ -34,7 +34,12 @@ import java.util.Map;
*
* @author kevinvandevelde at atmire.com
*/
public class CollectionDAOImpl extends AbstractHibernateDSODAO<Collection> implements CollectionDAO {
public class CollectionDAOImpl extends AbstractHibernateDSODAO<Collection> implements CollectionDAO
{
protected CollectionDAOImpl()
{
super();
}
/**
* Get all collections in the system. These are alphabetically sorted by

View File

@@ -32,7 +32,12 @@ import java.util.List;
*
* @author kevinvandevelde at atmire.com
*/
public class CommunityDAOImpl extends AbstractHibernateDSODAO<Community> implements CommunityDAO {
public class CommunityDAOImpl extends AbstractHibernateDSODAO<Community> implements CommunityDAO
{
protected CommunityDAOImpl()
{
super();
}
/**
* Get a list of all communities in the system. These are alphabetically

View File

@@ -42,8 +42,15 @@ import java.util.UUID;
*
* @author kevinvandevelde at atmire.com
*/
public class ItemDAOImpl extends AbstractHibernateDSODAO<Item> implements ItemDAO {
public class ItemDAOImpl extends AbstractHibernateDSODAO<Item> implements ItemDAO
{
private static final Logger log = Logger.getLogger(ItemDAOImpl.class);
protected ItemDAOImpl()
{
super();
}
@Override
public Iterator<Item> findAll(Context context, boolean archived) throws SQLException {
Query query = createQuery(context, "FROM Item WHERE inArchive= :in_archive");

View File

@@ -26,7 +26,12 @@ import java.util.List;
*
* @author kevinvandevelde at atmire.com
*/
public class MetadataFieldDAOImpl extends AbstractHibernateDAO<MetadataField> implements MetadataFieldDAO {
public class MetadataFieldDAOImpl extends AbstractHibernateDAO<MetadataField> implements MetadataFieldDAO
{
protected MetadataFieldDAOImpl()
{
super();
}
@Override
public MetadataField find(Context context, int metadataFieldId, MetadataSchema metadataSchema, String element,

View File

@@ -25,7 +25,12 @@ import java.util.List;
*
* @author kevinvandevelde at atmire.com
*/
public class MetadataSchemaDAOImpl extends AbstractHibernateDAO<MetadataSchema> implements MetadataSchemaDAO {
public class MetadataSchemaDAOImpl extends AbstractHibernateDAO<MetadataSchema> implements MetadataSchemaDAO
{
protected MetadataSchemaDAOImpl()
{
super();
}
/**
* Get the schema object corresponding to this namespace URI.

View File

@@ -26,7 +26,12 @@ import java.util.List;
*
* @author kevinvandevelde at atmire.com
*/
public class MetadataValueDAOImpl extends AbstractHibernateDAO<MetadataValue> implements MetadataValueDAO {
public class MetadataValueDAOImpl extends AbstractHibernateDAO<MetadataValue> implements MetadataValueDAO
{
protected MetadataValueDAOImpl()
{
super();
}
@Override

View File

@@ -22,7 +22,12 @@ import java.sql.SQLException;
*
* @author kevinvandevelde at atmire.com
*/
public class SiteDAOImpl extends AbstractHibernateDAO<Site> implements SiteDAO {
public class SiteDAOImpl extends AbstractHibernateDAO<Site> implements SiteDAO
{
protected SiteDAOImpl()
{
super();
}
@Override
public Site findSite(Context context) throws SQLException {

View File

@@ -31,7 +31,12 @@ import java.util.Map;
*
* @author kevinvandevelde at atmire.com
*/
public class WorkspaceItemDAOImpl extends AbstractHibernateDAO<WorkspaceItem> implements WorkspaceItemDAO {
public class WorkspaceItemDAOImpl extends AbstractHibernateDAO<WorkspaceItem> implements WorkspaceItemDAO
{
protected WorkspaceItemDAOImpl()
{
super();
}
@Override

View File

@@ -25,6 +25,11 @@ import java.util.UUID;
*/
public abstract class AbstractHibernateDAO<T> implements GenericDAO<T> {
protected AbstractHibernateDAO()
{
}
@Override
public T create(Context context, T t) throws SQLException {
getHibernateSession(context).persist(t);

View File

@@ -35,6 +35,11 @@ public class LicenseServiceImpl implements LicenseService
/** The default license */
protected String license;
protected LicenseServiceImpl()
{
}
@Override
public void writeLicenseFile(String licenseFile,
String newLicense)

View File

@@ -98,6 +98,11 @@ public class WorkflowCuratorServiceImpl implements WorkflowCuratorService
}
}
protected WorkflowCuratorServiceImpl()
{
}
@Override
public boolean needsCuration(BasicWorkflowItem wfi) {
return getFlowStep(wfi) != null;

View File

@@ -123,6 +123,11 @@ public class SolrServiceImpl implements SearchService, IndexingService {
private HttpSolrServer solr = null;
protected SolrServiceImpl()
{
}
protected HttpSolrServer getSolr()
{
if ( solr == null)

View File

@@ -73,6 +73,11 @@ public class EmbargoServiceImpl implements EmbargoService
@Autowired(required = true)
protected PluginService pluginService;
protected EmbargoServiceImpl()
{
}
@Override
public void setEmbargo(Context context, Item item)
throws SQLException, AuthorizeException

View File

@@ -49,6 +49,11 @@ public class AccountServiceImpl implements AccountService
@Autowired(required = true)
protected RegistrationDataService registrationDataService;
protected AccountServiceImpl()
{
}
/**
* Email registration info to the given email address.
*

View File

@@ -27,6 +27,11 @@ public class RegistrationDataServiceImpl implements RegistrationDataService
@Autowired(required = true)
protected RegistrationDataDAO registrationDataDAO;
protected RegistrationDataServiceImpl()
{
}
@Override
public RegistrationData create(Context context) throws SQLException, AuthorizeException {
return registrationDataDAO.create(context, new RegistrationData());

View File

@@ -41,6 +41,11 @@ public class SubscribeServiceImpl implements SubscribeService
@Autowired(required = true)
protected CollectionService collectionService;
protected SubscribeServiceImpl()
{
}
@Override
public List<Subscription> findAll(Context context) throws SQLException {
return subscriptionDAO.findAllOrderedByEPerson(context);

View File

@@ -31,7 +31,12 @@ import java.util.*;
*
* @author kevinvandevelde at atmire.com
*/
public class EPersonDAOImpl extends AbstractHibernateDSODAO<EPerson> implements EPersonDAO {
public class EPersonDAOImpl extends AbstractHibernateDSODAO<EPerson> implements EPersonDAO
{
protected EPersonDAOImpl()
{
super();
}
@Override
public EPerson findByEmail(Context context, String email) throws SQLException

View File

@@ -27,7 +27,12 @@ import java.util.Set;
*
* @author kevinvandevelde at atmire.com
*/
public class Group2GroupCacheDAOImpl extends AbstractHibernateDAO<Group2GroupCache> implements Group2GroupCacheDAO {
public class Group2GroupCacheDAOImpl extends AbstractHibernateDAO<Group2GroupCache> implements Group2GroupCacheDAO
{
protected Group2GroupCacheDAOImpl()
{
super();
}
@Override
public List<Group2GroupCache> findByParent(Context context, Group group) throws SQLException {

View File

@@ -31,7 +31,12 @@ import java.util.*;
*
* @author kevinvandevelde at atmire.com
*/
public class GroupDAOImpl extends AbstractHibernateDSODAO<Group> implements GroupDAO {
public class GroupDAOImpl extends AbstractHibernateDSODAO<Group> implements GroupDAO
{
protected GroupDAOImpl()
{
super();
}
@Override
public Group findByMetadataField(Context context, String searchValue, MetadataField metadataField) throws SQLException

View File

@@ -24,7 +24,13 @@ import java.sql.SQLException;
*
* @author kevinvandevelde at atmire.com
*/
public class RegistrationDataDAOImpl extends AbstractHibernateDAO<RegistrationData> implements RegistrationDataDAO {
public class RegistrationDataDAOImpl extends AbstractHibernateDAO<RegistrationData> implements RegistrationDataDAO
{
protected RegistrationDataDAOImpl()
{
super();
}
@Override
public RegistrationData findByEmail(Context context, String email) throws SQLException {

View File

@@ -28,7 +28,12 @@ import java.util.List;
*
* @author kevinvandevelde at atmire.com
*/
public class SubscriptionDAOImpl extends AbstractHibernateDAO<Subscription> implements SubscriptionDAO {
public class SubscriptionDAOImpl extends AbstractHibernateDAO<Subscription> implements SubscriptionDAO
{
protected SubscriptionDAOImpl()
{
super();
}
@Override
public List<Subscription> findByEPerson(Context context, EPerson eperson) throws SQLException {

View File

@@ -51,7 +51,7 @@ public class HandleServiceImpl implements HandleService
protected SiteService siteService;
/** Public Constructor */
public HandleServiceImpl()
protected HandleServiceImpl()
{
}

View File

@@ -26,7 +26,12 @@ import java.util.List;
*
* @author kevinvandevelde at atmire.com
*/
public class HandleDAOImpl extends AbstractHibernateDAO<Handle> implements HandleDAO {
public class HandleDAOImpl extends AbstractHibernateDAO<Handle> implements HandleDAO
{
protected HandleDAOImpl()
{
super();
}
@Override
public List<Handle> getHandlesByDSpaceObject(Context context, DSpaceObject dso) throws SQLException {

View File

@@ -34,6 +34,11 @@ public class HarvestSchedulingServiceImpl implements HarvestSchedulingService {
@Autowired(required = true)
protected HarvestedCollectionService harvestedCollectionService;
protected HarvestSchedulingServiceImpl()
{
}
@Override
public synchronized void startNewScheduler() throws SQLException, AuthorizeException {
Context c = new Context();

View File

@@ -31,6 +31,10 @@ public class HarvestedCollectionServiceImpl implements HarvestedCollectionServic
@Autowired(required = true)
protected HarvestedCollectionDAO harvestedCollectionDAO;
protected HarvestedCollectionServiceImpl()
{
}
@Override
public HarvestedCollection find(Context context, Collection collection) throws SQLException {
return harvestedCollectionDAO.findByCollection(context, collection);

View File

@@ -28,6 +28,11 @@ public class HarvestedItemServiceImpl implements HarvestedItemService {
@Autowired(required = true)
protected HarvestedItemDAO harvestedItemDAO;
protected HarvestedItemServiceImpl()
{
}
@Override
public HarvestedItem find(Context context, Item item) throws SQLException {
return harvestedItemDAO.findByItem(context, item);

View File

@@ -29,7 +29,12 @@ import java.util.List;
*
* @author kevinvandevelde at atmire.com
*/
public class HarvestedCollectionDAOImpl extends AbstractHibernateDAO<HarvestedCollection> implements HarvestedCollectionDAO {
public class HarvestedCollectionDAOImpl extends AbstractHibernateDAO<HarvestedCollection> implements HarvestedCollectionDAO
{
protected HarvestedCollectionDAOImpl()
{
super();
}
@Override

View File

@@ -25,7 +25,12 @@ import java.sql.SQLException;
*
* @author kevinvandevelde at atmire.com
*/
public class HarvestedItemDAOImpl extends AbstractHibernateDAO<HarvestedItem> implements HarvestedItemDAO {
public class HarvestedItemDAOImpl extends AbstractHibernateDAO<HarvestedItem> implements HarvestedItemDAO
{
protected HarvestedItemDAOImpl()
{
super();
}
@Override
public HarvestedItem findByItem(Context context, Item item) throws SQLException {

View File

@@ -31,6 +31,11 @@ public class DOIServiceImpl implements DOIService {
@Autowired(required = true)
protected DOIDAO doiDAO;
protected DOIServiceImpl()
{
}
@Override
public void update(Context context, DOI doi) throws SQLException {
doiDAO.save(context, doi);

View File

@@ -41,6 +41,11 @@ public class IdentifierServiceImpl implements IdentifierService {
@Autowired(required = true)
protected HandleService handleService;
protected IdentifierServiceImpl()
{
}
@Autowired
@Required
public void setProviders(List<IdentifierProvider> providers)

View File

@@ -27,7 +27,13 @@ import java.util.List;
*
* @author kevinvandevelde at atmire.com
*/
public class DOIDAOImpl extends AbstractHibernateDAO<DOI> implements DOIDAO {
public class DOIDAOImpl extends AbstractHibernateDAO<DOI> implements DOIDAO
{
protected DOIDAOImpl()
{
super();
}
@Override
public DOI findByDoi(Context context, String doi) throws SQLException {
Criteria criteria = createCriteria(context, DOI.class);

View File

@@ -69,6 +69,11 @@ public class CreativeCommonsServiceImpl implements CreativeCommonsService, Initi
@Autowired(required = true)
protected ItemService itemService;
protected CreativeCommonsServiceImpl()
{
}
@Override
public void afterPropertiesSet() throws Exception
{

View File

@@ -31,7 +31,7 @@ public class RDFConverterImpl implements RDFConverter
protected List<ConverterPlugin> plugins;
private static final Logger log = Logger.getLogger(RDFConverterImpl.class);
public RDFConverterImpl()
protected RDFConverterImpl()
{
this.configurationService = DSpaceServicesFactory.getInstance().getConfigurationService();
this.plugins = new ArrayList<ConverterPlugin>();

View File

@@ -105,6 +105,11 @@ public class SolrLoggerServiceImpl implements SolrLoggerService, InitializingBea
public String text() { return text; }
}
protected SolrLoggerServiceImpl()
{
}
@Override
public void afterPropertiesSet() throws Exception

View File

@@ -75,6 +75,11 @@ public class BitstreamStorageServiceImpl implements BitstreamStorageService, Ini
*/
protected final String REGISTERED_FLAG = "-R";
protected BitstreamStorageServiceImpl()
{
}
@Override
public void afterPropertiesSet() throws Exception {
for(Map.Entry<Integer, BitStoreService> storeEntry : stores.entrySet()) {

View File

@@ -30,6 +30,11 @@ public class VersionHistoryServiceImpl implements VersionHistoryService
@Autowired(required = true)
protected VersionHistoryDAO versionHistoryDAO;
protected VersionHistoryServiceImpl()
{
}
@Override
public VersionHistory create(Context context) throws SQLException {
return versionHistoryDAO.create(context, new VersionHistory());

View File

@@ -42,6 +42,11 @@ public class VersioningServiceImpl implements VersioningService {
private DefaultItemVersionProvider provider;
protected VersioningServiceImpl()
{
}
/** Service Methods */
@Override
public Version createNewVersion(Context c, Item item){

View File

@@ -29,6 +29,10 @@ import java.sql.SQLException;
*/
public class VersionDAOImpl extends AbstractHibernateDAO<Version> implements VersionDAO
{
protected VersionDAOImpl()
{
super();
}
@Override
public Version findByItem(Context context, Item item) throws SQLException {

View File

@@ -27,7 +27,12 @@ import java.sql.SQLException;
* @author Ben Bosman (ben at atmire dot com)
* @author kevinvandevelde at atmire.com
*/
public class VersionHistoryDAOImpl extends AbstractHibernateDAO<VersionHistory> implements VersionHistoryDAO {
public class VersionHistoryDAOImpl extends AbstractHibernateDAO<VersionHistory> implements VersionHistoryDAO
{
protected VersionHistoryDAOImpl()
{
super();
}
@Override
public VersionHistory findByItem(Context context, Item item) throws SQLException {

View File

@@ -46,6 +46,11 @@ public class BasicWorkflowItemServiceImpl implements BasicWorkflowItemService {
protected TaskListItemService taskListItemService;
protected BasicWorkflowItemServiceImpl()
{
}
@Override
public BasicWorkflowItem create(Context context, Item item, Collection collection) throws SQLException, AuthorizeException {
if(findByItem(context, item) != null){

View File

@@ -61,6 +61,11 @@ public class BasicWorkflowServiceImpl implements BasicWorkflowService
@Autowired(required = true)
protected WorkspaceItemService workspaceItemService;
protected BasicWorkflowServiceImpl()
{
}
/** Symbolic names of workflow steps. */
protected final String workflowText[] =
{

View File

@@ -28,6 +28,11 @@ public class TaskListItemServiceImpl implements TaskListItemService {
@Autowired(required = true)
protected TaskListItemDAO taskListItemDAO;
protected TaskListItemServiceImpl()
{
}
@Override
public TaskListItem create(Context context, BasicWorkflowItem workflowItem, EPerson ePerson) throws SQLException {
TaskListItem taskListItem = taskListItemDAO.create(context, new TaskListItem());

View File

@@ -29,7 +29,12 @@ import java.util.List;
*
* @author kevinvandevelde at atmire.com
*/
public class BasicWorkflowItemDAOImpl extends AbstractHibernateDAO<BasicWorkflowItem> implements BasicWorkflowItemDAO {
public class BasicWorkflowItemDAOImpl extends AbstractHibernateDAO<BasicWorkflowItem> implements BasicWorkflowItemDAO
{
protected BasicWorkflowItemDAOImpl()
{
super();
}
@Override

View File

@@ -29,6 +29,10 @@ import java.util.List;
*/
public class TaskListItemDAOImpl extends AbstractHibernateDAO<TaskListItem> implements TaskListItemDAO
{
protected TaskListItemDAOImpl()
{
super();
}
@Override
public void deleteByWorkflowItem(Context context, BasicWorkflowItem workflowItem) throws SQLException {

View File

@@ -53,6 +53,10 @@ public class WorkflowRequirementsServiceImpl implements WorkflowRequirementsServ
@Autowired(required = true)
protected XmlWorkflowService xmlWorkflowService;
protected WorkflowRequirementsServiceImpl()
{
}
@Override
public void addClaimedUser(Context context, XmlWorkflowItem wfi, Step step, EPerson user) throws SQLException, AuthorizeException, IOException {

View File

@@ -45,6 +45,11 @@ public class XmlWorkflowFactoryImpl implements XmlWorkflowFactory {
protected String path = ConfigurationManager.getProperty("dspace.dir")+"/config/workflow.xml";
// private static String pathActions = ConfigurationManager.getProperty("dspace.dir")+"/config/workflow-actions.xml";
protected XmlWorkflowFactoryImpl()
{
}
@Override
public Workflow getWorkflow(Collection collection) throws IOException, WorkflowConfigurationException {
//Initialize our cache if we have none

View File

@@ -86,6 +86,10 @@ public class XmlWorkflowServiceImpl implements XmlWorkflowService {
@Autowired(required = true)
protected GroupService groupService;
protected XmlWorkflowServiceImpl()
{
}
@Override

View File

@@ -31,6 +31,11 @@ public class ClaimedTaskServiceImpl implements ClaimedTaskService
@Autowired(required = true)
protected ClaimedTaskDAO claimedTaskDAO;
protected ClaimedTaskServiceImpl()
{
}
@Override
public ClaimedTask create(Context context) throws SQLException, AuthorizeException {
return claimedTaskDAO.create(context, new ClaimedTask());

View File

@@ -29,6 +29,10 @@ public class CollectionRoleServiceImpl implements CollectionRoleService {
@Autowired(required = true)
protected CollectionRoleDAO collectionRoleDAO;
protected CollectionRoleServiceImpl()
{
}
@Override

View File

@@ -29,6 +29,11 @@ public class InProgressUserServiceImpl implements InProgressUserService {
@Autowired(required = true)
protected InProgressUserDAO inProgressUserDAO;
protected InProgressUserServiceImpl()
{
}
@Override
public InProgressUser findByWorkflowItemAndEPerson(Context context, XmlWorkflowItem workflowItem, EPerson ePerson) throws SQLException {
return inProgressUserDAO.findByWorkflowItemAndEPerson(context, workflowItem, ePerson);

View File

@@ -40,6 +40,11 @@ public class PoolTaskServiceImpl implements PoolTaskService {
@Autowired(required = true)
protected InProgressUserService inProgressUserService;
protected PoolTaskServiceImpl()
{
}
@Override
public List<PoolTask> findByEperson(Context context, EPerson ePerson) throws SQLException, AuthorizeException, IOException {
List<PoolTask> result = poolTaskDAO.findByEPerson(context, ePerson);

View File

@@ -30,6 +30,11 @@ public class WorkflowItemRoleServiceImpl implements WorkflowItemRoleService {
@Autowired(required = true)
private WorkflowItemRoleDAO workflowItemRoleDAO;
protected WorkflowItemRoleServiceImpl()
{
}
@Override
public List<WorkflowItemRole> find(Context context, XmlWorkflowItem workflowItem, String role) throws SQLException {
return workflowItemRoleDAO.findByWorkflowItemAndRole(context, workflowItem, role);

View File

@@ -55,6 +55,11 @@ public class XmlWorkflowItemServiceImpl implements XmlWorkflowItemService {
private Logger log = Logger.getLogger(XmlWorkflowItemServiceImpl.class);
protected XmlWorkflowItemServiceImpl()
{
}
@Override
public XmlWorkflowItem create(Context context, Item item, Collection collection) throws SQLException, AuthorizeException {
XmlWorkflowItem xmlWorkflowItem = xmlWorkflowItemDAO.create(context, new XmlWorkflowItem());

View File

@@ -26,7 +26,12 @@ import java.util.List;
*
* @author kevinvandevelde at atmire.com
*/
public class ClaimedTaskDAOImpl extends AbstractHibernateDAO<ClaimedTask> implements ClaimedTaskDAO {
public class ClaimedTaskDAOImpl extends AbstractHibernateDAO<ClaimedTask> implements ClaimedTaskDAO
{
protected ClaimedTaskDAOImpl()
{
super();
}
@Override
public List<ClaimedTask> findByWorkflowItem(Context context, XmlWorkflowItem workflowItem) throws SQLException {

View File

@@ -26,7 +26,12 @@ import java.util.List;
*
* @author kevinvandevelde at atmire.com
*/
public class CollectionRoleDAOImpl extends AbstractHibernateDAO<CollectionRole> implements CollectionRoleDAO {
public class CollectionRoleDAOImpl extends AbstractHibernateDAO<CollectionRole> implements CollectionRoleDAO
{
protected CollectionRoleDAOImpl()
{
super();
}
@Override
public List<CollectionRole> findByCollection(Context context, Collection collection) throws SQLException {

View File

@@ -26,7 +26,12 @@ import java.util.List;
*
* @author kevinvandevelde at atmire.com
*/
public class InProgressUserDAOImpl extends AbstractHibernateDAO<InProgressUser> implements InProgressUserDAO {
public class InProgressUserDAOImpl extends AbstractHibernateDAO<InProgressUser> implements InProgressUserDAO
{
protected InProgressUserDAOImpl()
{
super();
}
@Override
public InProgressUser findByWorkflowItemAndEPerson(Context context, XmlWorkflowItem workflowItem, EPerson ePerson) throws SQLException {

View File

@@ -27,7 +27,12 @@ import java.util.List;
*
* @author kevinvandevelde at atmire.com
*/
public class PoolTaskDAOImpl extends AbstractHibernateDAO<PoolTask> implements PoolTaskDAO {
public class PoolTaskDAOImpl extends AbstractHibernateDAO<PoolTask> implements PoolTaskDAO
{
protected PoolTaskDAOImpl()
{
super();
}
@Override
public List<PoolTask> findByEPerson(Context context, EPerson ePerson) throws SQLException {

View File

@@ -26,7 +26,12 @@ import java.util.List;
*
* @author kevinvandevelde at atmire.com
*/
public class WorkflowItemRoleDAOImpl extends AbstractHibernateDAO<WorkflowItemRole> implements WorkflowItemRoleDAO {
public class WorkflowItemRoleDAOImpl extends AbstractHibernateDAO<WorkflowItemRole> implements WorkflowItemRoleDAO
{
protected WorkflowItemRoleDAOImpl()
{
super();
}
@Override
public List<WorkflowItemRole> findByWorkflowItemAndRole(Context context, XmlWorkflowItem workflowItem, String role) throws SQLException {

View File

@@ -27,7 +27,13 @@ import java.util.List;
*
* @author kevinvandevelde at atmire.com
*/
public class XmlWorkflowItemDAOImpl extends AbstractHibernateDAO<XmlWorkflowItem> implements XmlWorkflowItemDAO {
public class XmlWorkflowItemDAOImpl extends AbstractHibernateDAO<XmlWorkflowItem> implements XmlWorkflowItemDAO
{
protected XmlWorkflowItemDAOImpl()
{
super();
}
@Override
public List<XmlWorkflowItem> findAllInCollection(Context context, Integer offset, Integer limit, Collection collection) throws SQLException {