<commit_before>package org.jmotor.restful.response.status;

import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

/**
 * Component:
 * Description:
 * Date: 14-4-29
 *
 * @author <NAME>
 */
public class Created implements Status {
    private String uri;
    private String entity;
    private String identity;

    @Override
    public Response build(Object... parameters) {
        Created created = new Created();
        String entity = (String) parameters[1];
        String identity = String.valueOf(parameters[2]);
        String url = String.valueOf(parameters[0]) + "/" + entity + "/" + identity;
        created.setUri(url);
        created.setEntity(entity);
        created.setIdentity(identity);
        return Response.status(Response.Status.CREATED).entity(created).type(MediaType.APPLICATION_JSON_TYPE).build();
    }

    public String getUri() {
        return uri;
    }

    public void setUri(String uri) {
        this.uri = uri;
    }

    public String getEntity() {
        return entity;
    }

    public void setEntity(String entity) {
        this.entity = entity;
    }

    public String getIdentity() {
        return identity;
    }

    public void setIdentity(String identity) {
        this.identity = identity;
    }<commit_msg>Success response<commit_after>package org.jmotor.restful.response.status;

import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import java.util.Date;

/**
 * Component:
 * Description:
 * Date: 14-4-29
 *
 * @author <NAME>
 */
public class Created implements Status {
    private String uri;
    private String identity;
    private Date createdAt;

    @Override
    public Response build(Object... parameters) {
        Created created = new Created();
        String identity = String.valueOf(parameters[1]);
        String url = String.valueOf(parameters[0]) + "/" + identity;
        created.setUri(url);
        created.setIdentity(identity);
        created.setCreatedAt(new Date());
        return Response.status(Response.Status.CREATED).entity(created).type(MediaType.APPLICATION_JSON_TYPE).build();
    }

    public String getUri() {
        return uri;
    }

    public void setUri(String uri) {
        this.uri = uri;
    }

    public String getIdentity() {
        return identity;
    }

    public void setIdentity(String identity) {
        this.identity = identity;
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }
{'fraction_non_alphanumeric': 0.11228896741264233, 'fraction_numerical': 0.005889281507656066, 'mean_word_length': 2.6556671449067433, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6719103', 'n_tokens_mistral': 728, 'n_tokens_neox': 702, 'n_words': 169}