001package org.apache.archiva.redback.rest.api.model.v2; 002 003/* 004 * Licensed to the Apache Software Foundation (ASF) under one 005 * or more contributor license agreements. See the NOTICE file 006 * distributed with this work for additional information 007 * regarding copyright ownership. The ASF licenses this file 008 * to you under the Apache License, Version 2.0 (the 009 * "License"); you may not use this file except in compliance 010 * with the License. You may obtain a copy of the License at 011 * 012 * http://www.apache.org/licenses/LICENSE-2.0 013 * 014 * Unless required by applicable law or agreed to in writing, 015 * software distributed under the License is distributed on an 016 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 017 * KIND, either express or implied. See the License for the 018 * specific language governing permissions and limitations 019 * under the License. 020 */ 021 022import io.swagger.v3.oas.annotations.media.Schema; 023 024import javax.xml.bind.annotation.XmlRootElement; 025 026/** 027 * JSON object for updating own user data. 028 * Contains only the attributes, that a user is allowed to update. The user id is used from the logged in user principal. 029 */ 030@XmlRootElement( name = "user" ) 031public class SelfUserData 032{ 033 private String email; 034 private String fullName; 035 private String password; 036 private String currentPassword; 037 038 @Schema(name="email",description = "The email of the user.") 039 public String getEmail( ) 040 { 041 return email; 042 } 043 044 public void setEmail( String email ) 045 { 046 this.email = email; 047 } 048 049 @Schema(name="full_name", description = "The full or display name of the user.") 050 public String getFullName( ) 051 { 052 return fullName; 053 } 054 055 public void setFullName( String fullName ) 056 { 057 this.fullName = fullName; 058 } 059 060 @Schema(description = "New user password") 061 public String getPassword( ) 062 { 063 return password; 064 } 065 066 public void setPassword( String password ) 067 { 068 this.password = password; 069 } 070 071 @Schema(name="current_password",description = "The current user password.") 072 public String getCurrentPassword( ) 073 { 074 return currentPassword; 075 } 076 077 public void setCurrentPassword( String currentPassword ) 078 { 079 this.currentPassword = currentPassword; 080 } 081}