001 /*
002 * Licensed to the Apache Software Foundation (ASF) under one
003 * or more contributor license agreements. See the NOTICE file
004 * distributed with this work for additional information
005 * regarding copyright ownership. The ASF licenses this file
006 * to you under the Apache License, Version 2.0 (the
007 * "License"); you may not use this file except in compliance
008 * with the License. You may obtain a copy of the License at
009 *
010 * http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing,
013 * software distributed under the License is distributed on an
014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015 * KIND, either express or implied. See the License for the
016 * specific language governing permissions and limitations
017 * under the License.
018 *
019 */
020 package org.apache.directory.server.kerberos.shared.messages.components;
021
022
023 import org.apache.directory.server.kerberos.shared.messages.value.HostAddress;
024 import org.apache.directory.server.kerberos.shared.messages.value.KerberosTime;
025
026
027 /**
028 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
029 * @version $Rev: 540371 $, $Date: 2007-05-22 03:00:43 +0300 (Tue, 22 May 2007) $
030 */
031 public class EncKrbPrivPartModifier
032 {
033 private byte[] userData;
034 private KerberosTime timestamp; //optional
035 private Integer usec; //optional
036 private Integer sequenceNumber; //optional
037 private HostAddress senderAddress; //optional
038 private HostAddress recipientAddress; //optional
039
040
041 /**
042 * Returns the {@link EncKrbPrivPart}.
043 *
044 * @return The {@link EncKrbPrivPart}.
045 */
046 public EncKrbPrivPart getEncKrbPrivPart()
047 {
048 return new EncKrbPrivPart( userData, timestamp, usec, sequenceNumber, senderAddress, recipientAddress );
049 }
050
051
052 /**
053 * Sets the recipient {@link HostAddress}.
054 *
055 * @param address
056 */
057 public void setRecipientAddress( HostAddress address )
058 {
059 recipientAddress = address;
060 }
061
062
063 /**
064 * Sets the sender {@link HostAddress}.
065 *
066 * @param address
067 */
068 public void setSenderAddress( HostAddress address )
069 {
070 senderAddress = address;
071 }
072
073
074 /**
075 * Sets the sequence number.
076 *
077 * @param number
078 */
079 public void setSequenceNumber( Integer number )
080 {
081 sequenceNumber = number;
082 }
083
084
085 /**
086 * Sets the {@link KerberosTime} timestamp.
087 *
088 * @param timestamp
089 */
090 public void setTimestamp( KerberosTime timestamp )
091 {
092 this.timestamp = timestamp;
093 }
094
095
096 /**
097 * Sets the microsecond.
098 *
099 * @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 }