com.vmware.vim25.mo.samples.ext.ExtMgrUtil.class Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vijava Show documentation
Show all versions of vijava Show documentation
Java API for accessing VMWare web services API
The newest version!
???? 2Q *com/vmware/vim25/mo/samples/ext/ExtMgrUtil java/lang/Object ()V Code
LineNumberTable LocalVariableTable this ,Lcom/vmware/vim25/mo/samples/ext/ExtMgrUtil; main ([Ljava/lang/String;)V
Exceptions java/lang/Exception java/lang/System out Ljava/io/PrintStream; -Usage: java ExtMgrUtil [properties_file_path]
java/io/PrintStream println (Ljava/lang/String;)V " MSince no properties file is specified, we will search for it in current path. $ extension.properties
& ' ( readProperties *(Ljava/lang/String;)Ljava/util/Properties;
* + , exit (I)V . java/net/URL 0 url
2 4 3 java/util/Properties 5 6 getProperty &(Ljava/lang/String;)Ljava/lang/String;
- 8 : userName < password > operation @ keyStr B #com/vmware/vim25/mo/ServiceInstance
A D E 6(Ljava/net/URL;Ljava/lang/String;Ljava/lang/String;Z)V
A G H I getExtensionManager (()Lcom/vmware/vim25/mo/ExtensionManager; K register
M O N java/lang/String P Q equalsIgnoreCase (Ljava/lang/String;)Z
S U T $com/vmware/vim25/mo/ExtensionManager V W
findExtension 0(Ljava/lang/String;)Lcom/vmware/vim25/Extension; Y java/lang/StringBuilder [ Plugin key:
X 8
X ^ _ ` append -(Ljava/lang/String;)Ljava/lang/StringBuilder; b $ is used. Please try with a new key.
X d e f toString ()Ljava/lang/String;
h i j createExtensionObject 4(Ljava/util/Properties;)Lcom/vmware/vim25/Extension;
S l m n registerExtension (Lcom/vmware/vim25/Extension;)V p Plugin: r " has been successfully registered. t update
S v w n updateExtension y has been successfully updated. { @The plugin doesn't exist. Please register it before updating it. } listall
S ? ? getExtensionList ()[Lcom/vmware/vim25/Extension;
? ? ? printAllExtensions ([Lcom/vmware/vim25/Extension;)V ?
unregister
S ? ? unregisterExtension ? % has been successfully un-registered. ? * does NOT exist. No need to unregister it. ? find ? is registered. ? can NOT be found. ? *Operation is not valide. Please try again.
A ? ? ? getServerConnection (()Lcom/vmware/vim25/mo/ServerConnection;
? ? ? $com/vmware/vim25/mo/ServerConnection ? logout args [Ljava/lang/String; filename Ljava/lang/String; props Ljava/util/Properties; Ljava/net/URL; si %Lcom/vmware/vim25/mo/ServiceInstance; extMgr &Lcom/vmware/vim25/mo/ExtensionManager; ext Lcom/vmware/vim25/Extension;
StackMapTable ?
2 ? java/io/FileInputStream
? 8
2 ? ? ? load (Ljava/io/InputStream;)V ? Properties file ? % does NOT exist. Please double check.
? ? ? close
? ? ? java/io/IOException ? printStackTrace ? 3Please check the parameters in the properties file ? java/io/FileNotFoundException fis Ljava/io/FileInputStream; fnfe Ljava/io/FileNotFoundException; ioe Ljava/io/IOException; ? java/lang/Throwable ?
companyStr ? descStr ? extUrl ?
adminEmail ? version ? com/vmware/vim25/Description
?
? ? ? setLabel
? ? ?
setSummary ? $com/vmware/vim25/ExtensionServerInfo
?
? ? ? ? setDescription !(Lcom/vmware/vim25/Description;)V
? ? ? setUrl
? ? ?
setCompany ? com.vmware.vim.viClientScripts
? ? ? setType
? ? ?
setAdminEmail ? $com/vmware/vim25/ExtensionClientInfo
?
? ?
? ?
? ?
? ? ?
setVersion
? ? com/vmware/vim25/Extension
setServer *([Lcom/vmware/vim25/ExtensionServerInfo;)V
setClient *([Lcom/vmware/vim25/ExtensionClientInfo;)V
?
setKey
?
java/util/Calendar getInstance ()Ljava/util/Calendar;
setLastHeartbeatTime (Ljava/util/Calendar;)V description Lcom/vmware/vim25/Description; esi &Lcom/vmware/vim25/ExtensionServerInfo; eci &Lcom/vmware/vim25/ExtensionClientInfo;" There are totally
X$ _% (I)Ljava/lang/StringBuilder;' plugin(s) registered.)
--- Plugin # + --- - Key:
/0 f getKey2 Version:
45 f
getVersion7 Registration Time:
9: getLastHeartbeatTime
<=> getTime ()Ljava/util/Date;
X@ _A -(Ljava/lang/Object;)Ljava/lang/StringBuilder;C Configuration URL:
EFG getServer )()[Lcom/vmware/vim25/ExtensionServerInfo;
?IJ f getUrl exts [Lcom/vmware/vim25/Extension; i I
SourceFile ExtMgrUtil.java ! / *? ?
3
? ?L*?? ? ? ? !? #L? *2L+? %M,? ? )? -Y,/? 1? 7N,9? 1:,;? 1:,=? 1:,?? 1:? AY-? C:? F: J? L? X ? R? "? ? XYZ? \? ]a? ]? c? ?B,? g:
? k? ? XYo? \? ]q? ]? c? ?s? L? D ? R? /,? g:
? u? ? XYo? \? ]x? ]? c? ? ֲ z? ? ?|? L? ? ~? ?? ??? L? R ? R? ) ? ?? ? XYo? \? ]?? ]? c? ? |? ? XYo? \? ]?? ]? c? ? ]?? L? K ? R? "? ? XYo? \? ]?? ]? c? ? *? ? XYo? \? ]?? ]? c? ? ? ?? ? ?? ??
? : 8 9 ; = ? C ! G &