All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.vmware.vim25.mo.samples.security.CreateRole.class Maven / Gradle / Ivy

The newest version!
????2?/com/vmware/vim25/mo/samples/security/CreateRolejava/lang/Object()VCode
	LineNumberTableLocalVariableTablethis1Lcom/vmware/vim25/mo/samples/security/CreateRole;main([Ljava/lang/String;)V
Exceptionsjava/lang/Exception	java/lang/SystemoutLjava/io/PrintStream;2Usage: java CreateRole   
java/io/PrintStream println(Ljava/lang/String;)V"#com/vmware/vim25/mo/ServiceInstance$java/net/URL
#& 
!()6(Ljava/net/URL;Ljava/lang/String;Ljava/lang/String;Z)V
!+,-getAuthorizationManager,()Lcom/vmware/vim25/mo/AuthorizationManager;/master11java/lang/String3System.View5System.Read7System.Anonymous9Global.LogEvent
;=<(com/vmware/vim25/mo/AuthorizationManager>?addAuthorizationRole((Ljava/lang/String;[Ljava/lang/String;)IAmasterCGlobal.DiagnosticsE
Folder.Create
;GHIupdateAuthorizationRole)(ILjava/lang/String;[Ljava/lang/String;)VKjava/lang/StringBuilderMThe new role ID: 
J&
JPQRappend(I)Ljava/lang/StringBuilder;
JTUVtoString()Ljava/lang/String;Xcom/vmware/vim25/Permission
W	
W[\]setGroup(Z)V_vimaster
Wab setPrincipal
Wde]setPropagate
Wghi	setRoleId(I)V
!klm
getRootFolder()Lcom/vmware/vim25/mo/Folder;
;opqsetEntityPermissionsD(Lcom/vmware/vim25/mo/ManagedEntity;[Lcom/vmware/vim25/Permission;)V
;sturetrieveEntityPermissionsD(Lcom/vmware/vim25/mo/ManagedEntity;Z)[Lcom/vmware/vim25/Permission;wprint the permissions on root:
yz{printPermissions!([Lcom/vmware/vim25/Permission;)V
!}~getServerConnection(()Lcom/vmware/vim25/mo/ServerConnection;
???$com/vmware/vim25/mo/ServerConnection?logoutargs[Ljava/lang/String;si%Lcom/vmware/vim25/mo/ServiceInstance;am*Lcom/vmware/vim25/mo/AuthorizationManager;roleIdIpermLcom/vmware/vim25/Permission;ps[Lcom/vmware/vim25/Permission;
StackMapTable?
Entity:
W???	getEntity+()Lcom/vmware/vim25/ManagedObjectReference;
???'com/vmware/vim25/ManagedObjectReference?VgetType
J?Q?-(Ljava/lang/String;)Ljava/lang/StringBuilder;?:
???V	get_value?IsGroup:
W???isGroup()Z
J?Q?(Z)Ljava/lang/StringBuilder;?
Principal:
W??VgetPrincipal?Propogated:
W???isPropagate?RoleId:
W???	getRoleId()Ii
SourceFileCreateRole.java!/*??
+
	??*??????!Y?#Y*2?%*2*2?'L+?*M,.?0Y2SY4SY6SY8S?:>,@?0Y2SY4SY6SY8SYBSYDS?F??JYL?N?O?S??WY?Y:?Z^?`?c?f,+?j?WYS?n,+?j?r:?v??x+?|???
?"/1367$6(9-;0<6<@=H;LAPBWBaCkDsAvF?H?I?J?K?L?N?O?N?Q?R?Q?T?U?W?X>???(???-???L????J??????z{?




© 2015 - 2024 Weber Informatics LLC | Privacy Policy