All Downloads are FREE. Search and download functionalities are using the official Maven repository.

sirius.biz.jobs.system.SystemJobDescription Maven / Gradle / Ivy

There is a newer version: 9.6
Show newest version
/*
 * Made with all the love in the world
 * by scireum in Remshalden, Germany
 *
 * Copyright by scireum GmbH
 * http://www.scireum.de - [email protected]
 */

package sirius.biz.jobs.system;

import com.google.common.collect.Lists;
import sirius.biz.jobs.JobDescription;
import sirius.kernel.nls.NLS;
import sirius.web.security.Permissions;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.util.List;
import java.util.Set;

/**
 * Created by aha on 22.07.16.
 */
public abstract class SystemJobDescription extends JobDescription {

    protected final Set requiredPermissions = Permissions.computePermissionsFromAnnotations(getClass());

    @Nonnull
    @Override
    public String getTitle() {
        return NLS.get("Job." + getName());
    }

    @Nullable
    @Override
    public String getDescription() {
        return NLS.getIfExists("Job." + getName() + ".help", NLS.getCurrentLang()).orElse(null);
    }

    @Nonnull
    @Override
    public String getFactory() {
        return SystemJobsFactory.SYSTEM;
    }

    @Override
    public List getPermissions() {
        return Lists.newArrayList(requiredPermissions);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy