Record Class CaldavManagedMode
- Record Components:
serverId- the registration the instance chose, null when managed mode is offserverName- that registration's display name, null when managed mode is off — the screens name the server rather than print its idmanagedForMe- whether the caller is governed by that choice, so their connect and disconnect affordances must not be offered
Two answers in one payload, and they are deliberately not the same question.
serverId and serverName say what the instance decided
— the administration screen renders them, and they are the same for
everybody. managedForMe says whether the decision applies to
the caller, which is what the browser acts on when it takes the
connect and disconnect affordances away.
Today the two cannot disagree: managed mode is on or off for the whole instance. They are separate anyway because the next step is group exclusions, and when an excluded group may still connect an account of its own, the per-viewer verdict is the only one a component may read. Answering it here costs one service method; discovering later that every front-end component read the global flag would cost a component each.
-
Constructor Summary
ConstructorsConstructorDescriptionCaldavManagedMode(Long serverId, String serverName, boolean managedForMe) Creates an instance of aCaldavManagedModerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of themanagedForMerecord component.serverId()Returns the value of theserverIdrecord component.Returns the value of theserverNamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CaldavManagedMode
Creates an instance of aCaldavManagedModerecord class.- Parameters:
serverId- the value for theserverIdrecord componentserverName- the value for theserverNamerecord componentmanagedForMe- the value for themanagedForMerecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
serverId
Returns the value of theserverIdrecord component.- Returns:
- the value of the
serverIdrecord component
-
serverName
Returns the value of theserverNamerecord component.- Returns:
- the value of the
serverNamerecord component
-
managedForMe
public boolean managedForMe()Returns the value of themanagedForMerecord component.- Returns:
- the value of the
managedForMerecord component
-