use of edu.stanford.bmir.protege.web.shared.project.ProjectDetails in project webprotege by protegeproject.
the class AvailableProjectsCache method setInTrash.
public boolean setInTrash(ProjectId projectId, boolean inTrash) {
AvailableProject availableProject = cache.get(projectId);
if (availableProject == null) {
return false;
}
if (availableProject.getProjectDetails().isInTrash() == inTrash) {
return false;
}
ProjectDetails replacementDetails = availableProject.getProjectDetails().builder().setInTrash(inTrash).build();
cache.put(projectId, new AvailableProject(replacementDetails, availableProject.isDownloadable(), availableProject.isTrashable(), availableProject.getLastOpenedAt()));
return true;
}
use of edu.stanford.bmir.protege.web.shared.project.ProjectDetails in project webprotege by protegeproject.
the class ProjectDetailsRepository_IT method setUp.
@Before
public void setUp() {
MongoClient mongoClient = MongoTestUtils.createMongoClient();
database = mongoClient.getDatabase(MongoTestUtils.getTestDbName());
repository = new ProjectDetailsRepository(database, new ProjectDetailsConverter());
projectDetails = new ProjectDetails(projectId, "The Display Name", "The Description", owner, IN_TRASH, CREATED_AT, createdBy, MODIFIED_AT, lastModifiedBy);
// Insert project details
repository.save(projectDetails);
}
Aggregations