-
Notifications
You must be signed in to change notification settings - Fork 493
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stash: CreateDataverseFeaturedItemCommand WIP
- Loading branch information
Showing
3 changed files
with
54 additions
and
1 deletion.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
src/main/java/edu/harvard/iq/dataverse/DataverseFeaturedItem.java
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package edu.harvard.iq.dataverse; | ||
|
||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.GeneratedValue; | ||
import jakarta.persistence.GenerationType; | ||
import jakarta.persistence.Id; | ||
|
||
@Entity | ||
public class DataverseFeaturedItem { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long id; | ||
|
||
public void setId(Long id) { | ||
this.id = id; | ||
} | ||
|
||
public Long getId() { | ||
return id; | ||
} | ||
} |
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
29 changes: 29 additions & 0 deletions
29
...java/edu/harvard/iq/dataverse/engine/command/impl/CreateDataverseFeaturedItemCommand.java
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package edu.harvard.iq.dataverse.engine.command.impl; | ||
|
||
import edu.harvard.iq.dataverse.Dataverse; | ||
import edu.harvard.iq.dataverse.DataverseFeaturedItem; | ||
import edu.harvard.iq.dataverse.engine.command.AbstractCommand; | ||
import edu.harvard.iq.dataverse.engine.command.CommandContext; | ||
import edu.harvard.iq.dataverse.engine.command.DataverseRequest; | ||
import edu.harvard.iq.dataverse.engine.command.RequiredPermissions; | ||
import edu.harvard.iq.dataverse.engine.command.exception.CommandException; | ||
|
||
/** | ||
* A command that creates a featured item in a {@link Dataverse}. | ||
*/ | ||
//TODO permissions | ||
@RequiredPermissions({}) | ||
public class CreateDataverseFeaturedItemCommand extends AbstractCommand<DataverseFeaturedItem> { | ||
|
||
private final Dataverse dataverse; | ||
|
||
public CreateDataverseFeaturedItemCommand(DataverseRequest request, Dataverse dataverse) { | ||
super(request, dataverse); | ||
this.dataverse = dataverse; | ||
} | ||
|
||
@Override | ||
public DataverseFeaturedItem execute(CommandContext ctxt) throws CommandException { | ||
return null; | ||
} | ||
} |