1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one 3 * or more contributor license agreements. See the NOTICE file 4 * distributed with this work for additional information 5 * regarding copyright ownership. The ASF licenses this file 6 * to you under the Apache License, Version 2.0 (the 7 * "License"); you may not use this file except in compliance 8 * with the License. You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, 13 * software distributed under the License is distributed on an 14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 * KIND, either express or implied. See the License for the 16 * specific language governing permissions and limitations 17 * under the License. 18 * 19 */ 20 package org.apache.directory.server.kerberos.shared.messages.components; 21 22 23 import org.apache.directory.server.kerberos.shared.messages.value.HostAddress; 24 import org.apache.directory.server.kerberos.shared.messages.value.KerberosTime; 25 26 27 /** 28 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a> 29 * @version $Rev: 540371 $, $Date: 2007-05-22 02:00:43 +0200 (Di, 22 Mai 2007) $ 30 */ 31 public class EncKrbPrivPartModifier 32 { 33 private byte[] userData; 34 private KerberosTime timestamp; //optional 35 private Integer usec; //optional 36 private Integer sequenceNumber; //optional 37 private HostAddress senderAddress; //optional 38 private HostAddress recipientAddress; //optional 39 40 41 /** 42 * Returns the {@link EncKrbPrivPart}. 43 * 44 * @return The {@link EncKrbPrivPart}. 45 */ 46 public EncKrbPrivPart getEncKrbPrivPart() 47 { 48 return new EncKrbPrivPart( userData, timestamp, usec, sequenceNumber, senderAddress, recipientAddress ); 49 } 50 51 52 /** 53 * Sets the recipient {@link HostAddress}. 54 * 55 * @param address 56 */ 57 public void setRecipientAddress( HostAddress address ) 58 { 59 recipientAddress = address; 60 } 61 62 63 /** 64 * Sets the sender {@link HostAddress}. 65 * 66 * @param address 67 */ 68 public void setSenderAddress( HostAddress address ) 69 { 70 senderAddress = address; 71 } 72 73 74 /** 75 * Sets the sequence number. 76 * 77 * @param number 78 */ 79 public void setSequenceNumber( Integer number ) 80 { 81 sequenceNumber = number; 82 } 83 84 85 /** 86 * Sets the {@link KerberosTime} timestamp. 87 * 88 * @param timestamp 89 */ 90 public void setTimestamp( KerberosTime timestamp ) 91 { 92 this.timestamp = timestamp; 93 } 94 95 96 /** 97 * Sets the microsecond. 98 * 99 * @param usec 100 */ 101 public void setMicroSecond( Integer usec ) 102 { 103 this.usec = usec; 104 } 105 106 107 /** 108 * Sets the user data. 109 * 110 * @param data 111 */ 112 public void setUserData( byte[] data ) 113 { 114 userData = data; 115 } 116 }