Java 类org.codehaus.jackson.map.annotate.JsonView 实例源码

项目:montgomery    文件:User.java   
@JsonView(JsonViews.Admin.class)
@Override
public Collection<? extends GrantedAuthority> getAuthorities() {
    Set<String> roles = this.getRoles();

    if (roles == null) {
        return Collections.emptyList();
    }

    Set<GrantedAuthority> authorities = new HashSet<GrantedAuthority>();
    for (String role : roles) {
        authorities.add(new SimpleGrantedAuthority(role));
    }

    return authorities;
}
项目:montgomery    文件:User.java   
@JsonView(JsonViews.Admin.class)
@Override
public Collection<? extends GrantedAuthority> getAuthorities() {
    Set<String> roles = this.getRoles();

    if (roles == null) {
        return Collections.emptyList();
    }

    Set<GrantedAuthority> authorities = new HashSet<GrantedAuthority>();
    for (String role : roles) {
        authorities.add(new SimpleGrantedAuthority(role));
    }

    return authorities;
}
项目:GitHub    文件:Jackson1Annotator.java   
@Override
public void propertyField(JFieldVar field, JDefinedClass clazz, String propertyName, JsonNode propertyNode) {
    field.annotate(JsonProperty.class).param("value", propertyName);
    if (field.type().erasure().equals(field.type().owner().ref(Set.class))) {
        field.annotate(JsonDeserialize.class).param("as", LinkedHashSet.class);
    }

    if (propertyNode.has("javaJsonView")) {
        field.annotate(JsonView.class).param(
                "value", field.type().owner().ref(propertyNode.get("javaJsonView").asText()));
    }
}
项目:12306-android-Decompile    文件:JacksonAnnotationIntrospector.java   
public String findDeserializablePropertyName(AnnotatedField paramAnnotatedField)
{
  JsonProperty localJsonProperty = (JsonProperty)paramAnnotatedField.getAnnotation(JsonProperty.class);
  if (localJsonProperty != null)
    return localJsonProperty.value();
  if ((paramAnnotatedField.hasAnnotation(JsonDeserialize.class)) || (paramAnnotatedField.hasAnnotation(JsonView.class)))
    return "";
  return null;
}
项目:12306-android-Decompile    文件:JacksonAnnotationIntrospector.java   
public String findGettablePropertyName(AnnotatedMethod paramAnnotatedMethod)
{
  JsonProperty localJsonProperty = (JsonProperty)paramAnnotatedMethod.getAnnotation(JsonProperty.class);
  if (localJsonProperty != null)
    return localJsonProperty.value();
  JsonGetter localJsonGetter = (JsonGetter)paramAnnotatedMethod.getAnnotation(JsonGetter.class);
  if (localJsonGetter != null)
    return localJsonGetter.value();
  if ((paramAnnotatedMethod.hasAnnotation(JsonSerialize.class)) || (paramAnnotatedMethod.hasAnnotation(JsonView.class)))
    return "";
  return null;
}
项目:12306-android-Decompile    文件:JacksonAnnotationIntrospector.java   
public String findSerializablePropertyName(AnnotatedField paramAnnotatedField)
{
  JsonProperty localJsonProperty = (JsonProperty)paramAnnotatedField.getAnnotation(JsonProperty.class);
  if (localJsonProperty != null)
    return localJsonProperty.value();
  if ((paramAnnotatedField.hasAnnotation(JsonSerialize.class)) || (paramAnnotatedField.hasAnnotation(JsonView.class)))
    return "";
  return null;
}
项目:12306-android-Decompile    文件:JacksonAnnotationIntrospector.java   
public Class<?>[] findSerializationViews(Annotated paramAnnotated)
{
  JsonView localJsonView = (JsonView)paramAnnotated.getAnnotation(JsonView.class);
  if (localJsonView == null)
    return null;
  return localJsonView.value();
}
项目:12306-android-Decompile    文件:JacksonAnnotationIntrospector.java   
public String findSettablePropertyName(AnnotatedMethod paramAnnotatedMethod)
{
  JsonProperty localJsonProperty = (JsonProperty)paramAnnotatedMethod.getAnnotation(JsonProperty.class);
  if (localJsonProperty != null)
    return localJsonProperty.value();
  JsonSetter localJsonSetter = (JsonSetter)paramAnnotatedMethod.getAnnotation(JsonSetter.class);
  if (localJsonSetter != null)
    return localJsonSetter.value();
  if ((paramAnnotatedMethod.hasAnnotation(JsonDeserialize.class)) || (paramAnnotatedMethod.hasAnnotation(JsonView.class)))
    return "";
  return null;
}
项目:12306-android-Decompile    文件:JacksonAnnotationIntrospector.java   
public String findDeserializablePropertyName(AnnotatedField paramAnnotatedField)
{
  JsonProperty localJsonProperty = (JsonProperty)paramAnnotatedField.getAnnotation(JsonProperty.class);
  if (localJsonProperty != null)
    return localJsonProperty.value();
  if ((paramAnnotatedField.hasAnnotation(JsonDeserialize.class)) || (paramAnnotatedField.hasAnnotation(JsonView.class)))
    return "";
  return null;
}
项目:12306-android-Decompile    文件:JacksonAnnotationIntrospector.java   
public String findGettablePropertyName(AnnotatedMethod paramAnnotatedMethod)
{
  JsonProperty localJsonProperty = (JsonProperty)paramAnnotatedMethod.getAnnotation(JsonProperty.class);
  if (localJsonProperty != null)
    return localJsonProperty.value();
  JsonGetter localJsonGetter = (JsonGetter)paramAnnotatedMethod.getAnnotation(JsonGetter.class);
  if (localJsonGetter != null)
    return localJsonGetter.value();
  if ((paramAnnotatedMethod.hasAnnotation(JsonSerialize.class)) || (paramAnnotatedMethod.hasAnnotation(JsonView.class)))
    return "";
  return null;
}
项目:12306-android-Decompile    文件:JacksonAnnotationIntrospector.java   
public String findSerializablePropertyName(AnnotatedField paramAnnotatedField)
{
  JsonProperty localJsonProperty = (JsonProperty)paramAnnotatedField.getAnnotation(JsonProperty.class);
  if (localJsonProperty != null)
    return localJsonProperty.value();
  if ((paramAnnotatedField.hasAnnotation(JsonSerialize.class)) || (paramAnnotatedField.hasAnnotation(JsonView.class)))
    return "";
  return null;
}
项目:12306-android-Decompile    文件:JacksonAnnotationIntrospector.java   
public Class<?>[] findSerializationViews(Annotated paramAnnotated)
{
  JsonView localJsonView = (JsonView)paramAnnotated.getAnnotation(JsonView.class);
  if (localJsonView == null)
    return null;
  return localJsonView.value();
}
项目:12306-android-Decompile    文件:JacksonAnnotationIntrospector.java   
public String findSettablePropertyName(AnnotatedMethod paramAnnotatedMethod)
{
  JsonProperty localJsonProperty = (JsonProperty)paramAnnotatedMethod.getAnnotation(JsonProperty.class);
  if (localJsonProperty != null)
    return localJsonProperty.value();
  JsonSetter localJsonSetter = (JsonSetter)paramAnnotatedMethod.getAnnotation(JsonSetter.class);
  if (localJsonSetter != null)
    return localJsonSetter.value();
  if ((paramAnnotatedMethod.hasAnnotation(JsonDeserialize.class)) || (paramAnnotatedMethod.hasAnnotation(JsonView.class)))
    return "";
  return null;
}
项目:ingress-indonesia-dev    文件:JacksonAnnotationIntrospector.java   
public String findDeserializablePropertyName(AnnotatedField paramAnnotatedField)
{
  JsonProperty localJsonProperty = (JsonProperty)paramAnnotatedField.getAnnotation(JsonProperty.class);
  if (localJsonProperty != null)
    return localJsonProperty.value();
  if ((paramAnnotatedField.hasAnnotation(JsonDeserialize.class)) || (paramAnnotatedField.hasAnnotation(JsonView.class)) || (paramAnnotatedField.hasAnnotation(JsonBackReference.class)) || (paramAnnotatedField.hasAnnotation(JsonManagedReference.class)))
    return "";
  return null;
}
项目:ingress-indonesia-dev    文件:JacksonAnnotationIntrospector.java   
public String findGettablePropertyName(AnnotatedMethod paramAnnotatedMethod)
{
  JsonProperty localJsonProperty = (JsonProperty)paramAnnotatedMethod.getAnnotation(JsonProperty.class);
  if (localJsonProperty != null)
    return localJsonProperty.value();
  JsonGetter localJsonGetter = (JsonGetter)paramAnnotatedMethod.getAnnotation(JsonGetter.class);
  if (localJsonGetter != null)
    return localJsonGetter.value();
  if ((paramAnnotatedMethod.hasAnnotation(JsonSerialize.class)) || (paramAnnotatedMethod.hasAnnotation(JsonView.class)))
    return "";
  return null;
}
项目:ingress-indonesia-dev    文件:JacksonAnnotationIntrospector.java   
public String findSerializablePropertyName(AnnotatedField paramAnnotatedField)
{
  JsonProperty localJsonProperty = (JsonProperty)paramAnnotatedField.getAnnotation(JsonProperty.class);
  if (localJsonProperty != null)
    return localJsonProperty.value();
  if ((paramAnnotatedField.hasAnnotation(JsonSerialize.class)) || (paramAnnotatedField.hasAnnotation(JsonView.class)))
    return "";
  return null;
}
项目:ingress-indonesia-dev    文件:JacksonAnnotationIntrospector.java   
public Class<?>[] findSerializationViews(Annotated paramAnnotated)
{
  JsonView localJsonView = (JsonView)paramAnnotated.getAnnotation(JsonView.class);
  if (localJsonView == null)
    return null;
  return localJsonView.value();
}
项目:ingress-indonesia-dev    文件:JacksonAnnotationIntrospector.java   
public String findSettablePropertyName(AnnotatedMethod paramAnnotatedMethod)
{
  JsonProperty localJsonProperty = (JsonProperty)paramAnnotatedMethod.getAnnotation(JsonProperty.class);
  if (localJsonProperty != null)
    return localJsonProperty.value();
  JsonSetter localJsonSetter = (JsonSetter)paramAnnotatedMethod.getAnnotation(JsonSetter.class);
  if (localJsonSetter != null)
    return localJsonSetter.value();
  if ((paramAnnotatedMethod.hasAnnotation(JsonDeserialize.class)) || (paramAnnotatedMethod.hasAnnotation(JsonView.class)) || (paramAnnotatedMethod.hasAnnotation(JsonBackReference.class)) || (paramAnnotatedMethod.hasAnnotation(JsonManagedReference.class)))
    return "";
  return null;
}
项目:neo4j-extensions    文件:UserClient.java   
/**
 * @return Status 201 on success.
 */
@POST
@Path("/create")
@Produces(MediaType.APPLICATION_JSON)
@JsonView(EntityView.class)
public Response create( @QueryParam("indexingOn") @DefaultValue("true") Boolean indexingOn,
                        @QueryParam("count") @DefaultValue("3") Integer count );
项目:neo4j-extensions    文件:UserClient.java   
/**
 * @return Status 200 on success.
 */
@GET
@Path("/pages")
@Produces(MediaType.APPLICATION_JSON)
@JsonView(EntityView.class)
public Response findUsers( @QueryParam("page") @DefaultValue("0") Integer page,
                           @QueryParam("page.size") @DefaultValue("10") Integer pageSize,
                           @QueryParam("pages") @DefaultValue("1") Integer pages );
项目:memorise    文件:Memo.java   
@JsonView(JsonViews.Publisher.class)
public Long getId() {
    return this.id;
}
项目:memorise    文件:Memo.java   
@JsonView(JsonViews.User.class)
public Date getDate() {
    return this.date;
}
项目:memorise    文件:Memo.java   
@JsonView(JsonViews.User.class)
public String getTitle() {
    return title;
}
项目:memorise    文件:Memo.java   
@JsonView(JsonViews.User.class)
public String getDescription() {
    return this.description;
}
项目:memorise    文件:Memo.java   
@JsonView(JsonViews.User.class)
public Long getCounter() {
    return counter;
}
项目:communote-server    文件:ApiResultError.java   
/**
 * @return the exceptionMessage
 */
@JsonView(DevelopmentView.class)
public String getExceptionMessage() {
    return exceptionMessage;
}
项目:communote-server    文件:ApiResultError.java   
/**
 * @return the exceptionMessage
 */
@JsonView(DevelopmentView.class)
public String getExceptionMessage() {
    return exceptionMessage;
}
项目:communote-server    文件:ApiResultError.java   
/**
 * @return the exceptionMessage
 */
@JsonView(DevelopmentView.class)
public String getExceptionMessage() {
    return exceptionMessage;
}
项目:communote-server    文件:ApiResultError.java   
/**
 * @return the exceptionMessage
 */
@JsonView(DevelopmentView.class)
public String getExceptionMessage() {
    return exceptionMessage;
}
项目:rtc2jira    文件:CustomFieldOption.java   
@JsonView(IssueView.Update.class)
public String getValue() {
  return value;
}
项目:rtc2jira    文件:IssueType.java   
@JsonView(IssueView.Update.class)
@Override
public String getKey() {
  return super.getKey();
}
项目:rtc2jira    文件:IssueType.java   
@JsonView(IssueView.Update.class)
public boolean isSubtask() {
  return subtask;
}
项目:rtc2jira    文件:ProjectOverview.java   
@JsonView(IssueView.Create.class)
public String getKey() {
  return super.getKey();
}
项目:rtc2jira    文件:ProjectOverview.java   
@JsonView(IssueView.Create.class)
public String getId() {
  return super.getId();
}
项目:rtc2jira    文件:ProjectOverview.java   
@JsonView(IssueView.Filtered.class)
@Override
public Date getCreated() {
  return null;
}
项目:rtc2jira    文件:ProjectOverview.java   
@JsonView(IssueView.Read.class)
public String getExpand() {
  return expand;
}
项目:rtc2jira    文件:BaseEntity.java   
@JsonView(IssueView.Read.class)
public URL getSelf() {
  return self;
}
项目:rtc2jira    文件:BaseEntity.java   
@JsonView(IssueView.Filtered.class)
abstract public String getPath();
项目:rtc2jira    文件:BaseEntity.java   
@JsonView(IssueView.Filtered.class)
public String getSelfPath() {
  return getPath() + "/" + getId();
}
项目:rtc2jira    文件:BaseEntity.java   
@XmlJavaTypeAdapter(JiraDateStringAdapter.class)
@JsonView(IssueView.Read.class)
public Date getCreated() {
  return created;
}