Skip to content

Commit

Permalink
Add JavaDocs to Organization- Factory & UtilService
Browse files Browse the repository at this point in the history
  • Loading branch information
DominikRemo committed Oct 20, 2023
1 parent 60088f6 commit aeb0156
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
public class OrganizationFactory {

/**
* Generate an example organization entity
* Generates an Organization.
*
* @param name of organization
* @param shortName of organization
* @param url of organization
* @param description of organization
* @param logoUrl of organization
* @param emailPattern of organization
* @return An organization entity
* @param name The name of the Organization
* @param shortName The short name of the Organization
* @param url The url of the Organization
* @param description The description of the Organization
* @param logoUrl The url to the logo of the Organization
* @param emailPattern The email pattern of the Organization
* @return The generated Organization
*/
public static Organization generateOrganization(String name, String shortName, String url, String description, String logoUrl, String emailPattern) {
Organization organization = new Organization();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,27 @@ public class OrganizationUtilService {
@Autowired
private OrganizationRepository organizationRepository;

/**
* Creates and saves an Organization with the given parameters.
*
* @param name The name of the Organization
* @param shortName The short name of the Organization
* @param url The url of the Organization
* @param description The description of the Organization
* @param logoUrl The url to the logo of the Organization
* @param emailPattern The email pattern of the Organization
* @return The created Organization
*/
public Organization createOrganization(String name, String shortName, String url, String description, String logoUrl, String emailPattern) {
Organization organization = OrganizationFactory.generateOrganization(name, shortName, url, description, logoUrl, emailPattern);
return organizationRepository.save(organization);
}

/**
* Creates and saves an Organization with random parameters.
*
* @return The created Organization
*/
public Organization createOrganization() {
return createOrganization(UUID.randomUUID().toString().replace("-", ""), UUID.randomUUID().toString().replace("-", ""), UUID.randomUUID().toString().replace("-", ""),
UUID.randomUUID().toString().replace("-", ""), null, "^.*@matching.*$");
Expand Down

0 comments on commit aeb0156

Please sign in to comment.