Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Module interface and HookCatalog utility #1199

Merged
merged 8 commits into from
Apr 2, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/main/java/org/prebid/server/hooks/v1/Module.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package org.prebid.server.hooks.v1;

import java.util.Set;

/**
* Cares of the module identification among other modules and supplies a collection of available {@Hook}s.
*/
public interface Module {

String code();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the code a unique identifier or can there be duplicates?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Module code should be unique among other available modules in application.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
String code();
/**
* A unique identifier that should be unique among other available modules.
*/
String code();

Maybe document a few of the usages of this code? Analytic events, logging, referencing in other modules?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing, i'll just document what we imaging how it should work so far.


Set<Hook> hooks();
}