<commit_before>package org.synyx.minos.skillz.web;

import static org.synyx.minos.skillz.SkillzPermissions.SKILLZ_ADMINISTRATION;
import static org.synyx.minos.skillz.SkillzPermissions.SKILLZ_USER;

import java.util.Arrays;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.synyx.minos.core.authentication.AuthenticationService;
import org.synyx.minos.core.web.menu.AbstractMenuItemProvider;
import org.synyx.minos.core.web.menu.MenuItem;
import org.synyx.minos.core.web.menu.UrlResolvingStrategy;
import org.synyx.minos.core.web.menu.UserPlaceholderAwareUrlResolvingStrategy;


/**
 * {@link org.synyx.minos.core.web.menu.MenuItemProvider} for Skillz module.
 * 
 * @author <NAME> - <EMAIL>
 */
public class SkillzMenuItemProvider extends AbstractMenuItemProvider {

    @Autowired
    private AuthenticationService authenticationService;

    private static final String MENU_SKILLZ = "MENU_SKILLZ";
    private static final String MENU_SKILLZ_PRIVATEPROJECTS = "MENU_SKILLZ_PRIVATEPROJECTS";
    private static final String MENU_SKILLZ_RESUME = "MENU_SKILLZ_RESUME";
    private static final String MENU_SKILLZ_SKILLZ = "MENU_SKILLZ_SKILLZ";
    private static final String MENU_SKILLZ_RESUMES_MANAGE = "MENU_SKILLZ_RESUMES_MANAGE";


    /*
     * (non-Javadoc)
     * 
     * @see com.synyx.minos.core.web.menu.AbstractMenuItemProvider#initMenuItems()
     */
    @Override
    protected List<MenuItem> initMenuItems() {

        MenuItem manageResumes =
                MenuItem.create(MENU_SKILLZ_RESUMES_MANAGE).withKeyBase("skillz.menu.manageResumes").withPosition(10)
                        .withUrl("/skillz/resumes").withPermission(SKILLZ_ADMINISTRATION).build();

        MenuItem skillz =
                MenuItem.create(MENU_SKILLZ_SKILLZ).withKeyBase("skillz.menu.skillz").withPosition(20).withUrl(
                        "/skillz").withPermission(SKILLZ_ADMINISTRATION).build();

        MenuItem resume =
                MenuItem.create(MENU_SKILLZ_RESUME).withKeyBase("skillz.menu.resume").withPosition(40).withUrl(
                        "/skillz/resume").withPermission(SKILLZ_USER).build();

        UrlResolvingStrategy privateProjectsStrategy =
                new UserPlaceholderAwareUrlResolvingStrategy(String.format("/skillz/projects/%s",
                        UserPlaceholderAwareUrlResolvingStrategy.DEFAULT_PLACEHOLDER), authenticationService);<commit_msg>* fixed classnames in skill module<commit_after>package org.synyx.minos.skillz.web;

import static org.synyx.minos.skillz.SkillzPermissions.SKILLZ_ADMINISTRATION;
import static org.synyx.minos.skillz.SkillzPermissions.SKILLZ_USER;

import java.util.Arrays;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.synyx.minos.core.authentication.AuthenticationService;
import org.synyx.minos.core.web.menu.AbstractMenuItemProvider;
import org.synyx.minos.core.web.menu.MenuItem;
import org.synyx.minos.core.web.menu.UrlResolver;
import org.synyx.minos.core.web.menu.UserPlaceholderAwareUrlResolver;


/**
 * {@link org.synyx.minos.core.web.menu.MenuItemProvider} for Skillz module.
 * 
 * @author <NAME> - <EMAIL>
 */
public class SkillzMenuItemProvider extends AbstractMenuItemProvider {

    @Autowired
    private AuthenticationService authenticationService;

    private static final String MENU_SKILLZ = "MENU_SKILLZ";
    private static final String MENU_SKILLZ_PRIVATEPROJECTS = "MENU_SKILLZ_PRIVATEPROJECTS";
    private static final String MENU_SKILLZ_RESUME = "MENU_SKILLZ_RESUME";
    private static final String MENU_SKILLZ_SKILLZ = "MENU_SKILLZ_SKILLZ";
    private static final String MENU_SKILLZ_RESUMES_MANAGE = "MENU_SKILLZ_RESUMES_MANAGE";


    /*
     * (non-Javadoc)
     * 
     * @see com.synyx.minos.core.web.menu.AbstractMenuItemProvider#initMenuItems()
     */
    @Override
    protected List<MenuItem> initMenuItems() {

        MenuItem manageResumes =
                MenuItem.create(MENU_SKILLZ_RESUMES_MANAGE).withKeyBase("skillz.menu.manageResumes").withPosition(10)
                        .withUrl("/skillz/resumes").withPermission(SKILLZ_ADMINISTRATION).build();

        MenuItem skillz =
                MenuItem.create(MENU_SKILLZ_SKILLZ).withKeyBase("skillz.menu.skillz").withPosition(20).withUrl(
                        "/skillz").withPermission(SKILLZ_ADMINISTRATION).build();

        MenuItem resume =
                MenuItem.create(MENU_SKILLZ_RESUME).withKeyBase("skillz.menu.resume").withPosition(40).withUrl(
                        "/skillz/resume").withPermission(SKILLZ_USER).build();

        UrlResolver privateProjectsStrategy =
                new UserPlaceholderAwareUrlResolver(String.format("/skillz/projects/%s",
                        UserPlaceholderAwareUrlResolver.DEFAULT_PLACEHOLDER), authenticationService);
{'fraction_non_alphanumeric': 0.09822899505766063, 'fraction_numerical': 0.002471169686985173, 'mean_word_length': 3.8961693548387095, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '683301', 'n_tokens_mistral': 1605, 'n_tokens_neox': 1546, 'n_words': 196}