org.kde.koala
Class KServiceOffer

java.lang.Object
  extended by org.kde.koala.KServiceOffer
All Implemented Interfaces:
org.kde.qt.QtSupport

public class KServiceOffer
extends java.lang.Object
implements org.kde.qt.QtSupport

This class holds the user-specific preferences of a service (whether it can be a default offer or not, how big is the preference for this offer, ...). Basically it is a reference to a KService, a number that represents the user's preference (bigger is better) and a flag whether the KService can be used as default.

See Also:
KService

Constructor Summary
  KServiceOffer()
          Create an invalid service offer.
protected KServiceOffer(java.lang.Class dummy)
           
  KServiceOffer(KServiceOffer arg1)
          Copy constructor.
 
Method Summary
 boolean allowAsDefault()
          Is it allowed to use this service for default actions (e.g.
 void dispose()
          Delete the wrapped C++ instance ahead of finalize()
protected  void finalize()
          Deletes the wrapped C++ instance
 boolean isDisposed()
          Has the wrapped C++ instance been deleted?
 boolean isValid()
          Check whether the entry is valid.
 boolean op_lt(KServiceOffer arg1)
          A service is bigger that the other when it can be default (and the other is not) and its preference value it higher.
 int preference()
          The bigger this number is, the better is this service.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KServiceOffer

protected KServiceOffer(java.lang.Class dummy)

KServiceOffer

public KServiceOffer()
Create an invalid service offer.


KServiceOffer

public KServiceOffer(KServiceOffer arg1)
Copy constructor. Shallow copy (the KService will not be copied).

Method Detail

op_lt

public boolean op_lt(KServiceOffer arg1)
A service is bigger that the other when it can be default (and the other is not) and its preference value it higher.


allowAsDefault

public boolean allowAsDefault()
Is it allowed to use this service for default actions (e.g. Left Click in a file manager, or KRun in general).

Returns:
true if the service is a allowed as default

preference

public int preference()
The bigger this number is, the better is this service.

Returns:
the preference number (negative numbers will be returned by invalid service offers)

isValid

public boolean isValid()
Check whether the entry is valid. A service is valid if its preference value is positive.

Returns:
true if the service offer is valid

finalize

protected void finalize()
                 throws java.lang.InternalError
Deletes the wrapped C++ instance

Overrides:
finalize in class java.lang.Object
Throws:
java.lang.InternalError

dispose

public void dispose()
Delete the wrapped C++ instance ahead of finalize()


isDisposed

public boolean isDisposed()
Has the wrapped C++ instance been deleted?