Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright (c) OSGi Alliance (2001, 2010). All Rights Reserved.
   *
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   *      http://www.apache.org/licenses/LICENSE-2.0
   *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
 package org.osgi.service.useradmin;
 
Role change event.

UserAdminEvent objects are delivered asynchronously to any UserAdminListener objects when a change occurs in any of the Role objects managed by a User Admin service.

A type code is used to identify the event. The following event types are defined: ROLE_CREATED type, ROLE_CHANGED type, and ROLE_REMOVED type. Additional event types may be defined in the future.

Version:
$Id: f4a18b25cc305bcdd8308c742129e893d72d2ae4 $
See also:
UserAdmin
UserAdminListener
 
 public class UserAdminEvent {
 	private ServiceReference	ref;
 	private int					type;
 	private Role				role;
A Role object has been created.

The value of ROLE_CREATED is 0x00000001.

 
 	public static final int		ROLE_CREATED	= 0x00000001;
A Role object has been modified.

The value of ROLE_CHANGED is 0x00000002.

 
 	public static final int		ROLE_CHANGED	= 0x00000002;
A Role object has been removed.

The value of ROLE_REMOVED is 0x00000004.

 
 	public static final int		ROLE_REMOVED	= 0x00000004;

Constructs a UserAdminEvent object from the given ServiceReference object, event type, and Role object.

Parameters:
ref The ServiceReference object of the User Admin service that generated this event.
type The event type.
role The Role object on which this event occurred.
 
 	public UserAdminEvent(ServiceReference refint typeRole role) {
 		this. = ref;
 		this. = type;
 		this. = role;
 	}

Gets the ServiceReference object of the User Admin service that generated this event.

Returns:
The User Admin service's ServiceReference object.
 
 		return ;
 	}

Returns the type of this event.

The type values are ROLE_CREATED type, ROLE_CHANGED type, and ROLE_REMOVED type.

Returns:
The event type.
 
 	public int getType() {
		return ;
	}

Gets the Role object this event was generated for.

Returns:
The Role object this event was generated for.
	public Role getRole() {
		return ;
	}
New to GrepCode? Check out our FAQ X