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

org.labkey.remoteapi.security.CreateProjectCommand Maven / Gradle / Ivy

Go to download

The client-side library for Java developers is a separate JAR from the LabKey Server code base. It can be used by any Java program, including another Java web application.

There is a newer version: 6.2.0
Show newest version
package org.labkey.remoteapi.security;

import org.apache.hc.core5.http.message.BasicNameValuePair;

import java.util.List;

/**
 * Similar to CreateContainerCommand, but supports the "Project Creator" role and creating projects from a template
 */
public class CreateProjectCommand extends BaseCreateFolderCommand
{
    private boolean _assignProjectAdmin = false;

    public CreateProjectCommand()
    {
        super("createProject");
    }

    @Override
    CreateProjectCommand getThis()
    {
        return this;
    }

    public CreateProjectCommand setAssignProjectAdmin(boolean assignProjectAdmin)
    {
        _assignProjectAdmin = assignProjectAdmin;
        return getThis();
    }

    @Override
    protected List getPostData()
    {
        List postData = super.getPostData();
        postData.add(new BasicNameValuePair("assignProjectAdmin", Boolean.toString(_assignProjectAdmin)));

        return postData;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy