-
Notifications
You must be signed in to change notification settings - Fork 355
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into DHIS2-16768
- Loading branch information
Showing
133 changed files
with
732 additions
and
1,620 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (c) 2004-2024, University of Oslo | ||
* Copyright (c) 2004-2025, University of Oslo | ||
* All rights reserved. | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
|
@@ -25,39 +25,18 @@ | |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
package org.hisp.dhis.scheduling; | ||
package org.hisp.dhis.common; | ||
|
||
import java.io.InputStream; | ||
import lombok.RequiredArgsConstructor; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.hisp.dhis.feedback.ConflictException; | ||
import org.hisp.dhis.fileresource.FileResourceService; | ||
import org.springframework.context.annotation.Profile; | ||
import org.springframework.stereotype.Service; | ||
import org.springframework.transaction.annotation.Transactional; | ||
import org.springframework.util.MimeType; | ||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
/** | ||
* @author Morten Svanæs <[email protected]> | ||
*/ | ||
@Slf4j | ||
@RequiredArgsConstructor | ||
@Service | ||
@Profile("!test") | ||
public class JobCreationHelperForProduction implements JobCreationHelper { | ||
|
||
private final JobConfigurationStore jobConfigurationStore; | ||
private final FileResourceService fileResourceService; | ||
@Retention(RetentionPolicy.RUNTIME) | ||
@Target(ElementType.METHOD) | ||
public @interface Sortable { | ||
|
||
@Transactional | ||
public String create(JobConfiguration config) throws ConflictException { | ||
return createFromConfig(config, jobConfigurationStore); | ||
} | ||
boolean value() default true; | ||
|
||
@Transactional | ||
public String create(JobConfiguration config, MimeType contentType, InputStream content) | ||
throws ConflictException { | ||
return createFromConfigAndInputStream( | ||
config, contentType, content, jobConfigurationStore, fileResourceService); | ||
} | ||
boolean whenPersisted() default true; | ||
} |
Oops, something went wrong.