-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
PR for #4035 - Pipeline Filter, Change ownership, nasty popup
- Loading branch information
Showing
28 changed files
with
444 additions
and
177 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
88 changes: 88 additions & 0 deletions
88
stroom-core-shared/src/main/java/stroom/processor/shared/ProcessorFilterDoc.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,88 @@ | ||
package stroom.processor.shared; | ||
|
||
import stroom.util.shared.Document; | ||
|
||
/** | ||
* A wrapper for a {@link ProcessorFilter} that has a name (which {@link ProcessorFilter} | ||
* doesn't. | ||
*/ | ||
public class ProcessorFilterDoc implements Document { | ||
|
||
public static final String DOCUMENT_TYPE = ProcessorFilter.ENTITY_TYPE; | ||
|
||
private final ProcessorFilter processorFilter; | ||
private String name = null; | ||
|
||
public ProcessorFilterDoc(final ProcessorFilter processorFilter) { | ||
this.processorFilter = processorFilter; | ||
} | ||
|
||
public ProcessorFilterDoc(final ProcessorFilter processorFilter, | ||
final String name) { | ||
this.processorFilter = processorFilter; | ||
this.name = name; | ||
} | ||
|
||
public ProcessorFilter getProcessorFilter() { | ||
return processorFilter; | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return name; | ||
} | ||
|
||
public void setName(final String name) { | ||
this.name = name; | ||
} | ||
|
||
@Override | ||
public String getType() { | ||
return ProcessorFilter.ENTITY_TYPE; | ||
} | ||
|
||
@Override | ||
public String getUuid() { | ||
return processorFilter.getUuid(); | ||
} | ||
|
||
@Override | ||
public Long getCreateTimeMs() { | ||
return processorFilter.getCreateTimeMs(); | ||
} | ||
|
||
@Override | ||
public void setCreateTimeMs(final Long createTimeMs) { | ||
processorFilter.setCreateTimeMs(createTimeMs); | ||
} | ||
|
||
@Override | ||
public String getCreateUser() { | ||
return processorFilter.getCreateUser(); | ||
} | ||
|
||
@Override | ||
public void setCreateUser(final String createUser) { | ||
processorFilter.setCreateUser(createUser); | ||
} | ||
|
||
@Override | ||
public Long getUpdateTimeMs() { | ||
return processorFilter.getUpdateTimeMs(); | ||
} | ||
|
||
@Override | ||
public void setUpdateTimeMs(final Long updateTimeMs) { | ||
processorFilter.setUpdateTimeMs(updateTimeMs); | ||
} | ||
|
||
@Override | ||
public String getUpdateUser() { | ||
return processorFilter.getUpdateUser(); | ||
} | ||
|
||
@Override | ||
public void setUpdateUser(final String updateUser) { | ||
processorFilter.setUpdateUser(updateUser); | ||
} | ||
} |
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
12 changes: 12 additions & 0 deletions
12
stroom-docref/src/main/java/stroom/docref/DocRefHandler.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,12 @@ | ||
package stroom.docref; | ||
|
||
public interface DocRefHandler extends HasFindDocsByName { | ||
|
||
/** | ||
* Retrieve the audit information for a particular doc ref | ||
* | ||
* @param uuid The UUID to return the information for | ||
* @return The Audit information about the given DocRef. | ||
*/ | ||
DocRefInfo info(String uuid); | ||
} |
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
37 changes: 37 additions & 0 deletions
37
...ocstore/stroom-docstore-api/src/main/java/stroom/docstore/api/DocumentActionHandlers.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,37 @@ | ||
package stroom.docstore.api; | ||
|
||
import jakarta.inject.Inject; | ||
import jakarta.inject.Singleton; | ||
|
||
import java.util.Map; | ||
import java.util.Objects; | ||
import java.util.function.Consumer; | ||
import java.util.stream.Stream; | ||
|
||
@Singleton | ||
public class DocumentActionHandlers { | ||
|
||
private final Map<DocumentType, DocumentActionHandler> handlersMap; | ||
|
||
@Inject | ||
public DocumentActionHandlers(final Map<DocumentType, DocumentActionHandler> handlersMap) { | ||
this.handlersMap = handlersMap; | ||
} | ||
|
||
public DocumentActionHandler<?> getHandler(final String type) { | ||
return handlersMap.get(new DocumentType(type)); | ||
} | ||
|
||
public void forEach(Consumer<DocumentActionHandler> consumer) { | ||
handlersMap.values() | ||
.stream() | ||
.filter(Objects::nonNull) | ||
.forEach(consumer); | ||
} | ||
|
||
public Stream<DocumentActionHandler> stream() { | ||
return handlersMap.values() | ||
.stream() | ||
.filter(Objects::nonNull); | ||
} | ||
} |
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
Oops, something went wrong.